• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Setting volume levels?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting volume levels?


  • Subject: Setting volume levels?
  • From: "Jim Dolan" <email@hidden>
  • Date: Thu, 26 Jun 2003 15:08:07 -0400
  • Thread-topic: Setting volume levels?

If I run the following code - why do I get different values in the last line?

It does not matter what value I feed in, I always get something less? I
thought maybe it was ramping but the value always seems to be less than, no
matter which direction I change the volume to.


// Set the new level
Float32 fVolume = 0.59;
Float32 fVolume2 = 0.0;
UInt32 dataSize = sizeof(Float32);

AudioDeviceSetProperty( iDeviceID, NULL, actualChannel, isInput,
kAudioDevicePropertyVolumeScalar, sizeof( Float32 ), &fVolume );

AudioDeviceGetProperty( iDeviceID, actualChannel, isInput,
kAudioDevicePropertyVolumeScalar, &dataSize, &fVolume2 );


printf( "Volume: %f %f\n", fVolume, fVolume2 );



Volume: 0.590000 0.586691
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Questions about AudioFile API
  • Next by Date: Re: Setting volume levels?
  • Previous by thread: Re: Questions about AudioFile API
  • Next by thread: Re: Setting volume levels?
  • Index(es):
    • Date
    • Thread