Re: Volume data in 16bit integer data
Re: Volume data in 16bit integer data
- Subject: Re: Volume data in 16bit integer data
- From: Jeff Moore <email@hidden>
- Date: Wed, 06 Feb 2002 19:10:04 -0800
on 2/6/02 6:51 PM, Joe Chang (@e@gH#) <email@hidden> wrote:
>
I need to send 16bit data as volume control to a device.
>
I think the only way to send volume control data
>
is to use 'kAudioDevicePropertyVolumeScalar', but this takes
>
32bit float value.
>
>
(Actually sending this data is not for changing volume,
>
but for changing settings of the device.)
>
>
I'm wondering I should convert 16bit data I want to send
>
to 32bit float value, or use Carbon Sound Manager to do this.
First, the Sound Manager just turns around and calls the HAL to change the
volume of the device, so that's probably not what you want.
You are correct with the usage of the volume property of a device. You will
need to convert your 16 bit number into a value in the range of 0.0 to 1.0
to use the scalar version of the property. If you'd like, you can convert it
to a dB value (according to the range of the control) and set it that way
too.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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.