Re: Volume data in 16bit integer data
Re: Volume data in 16bit integer data
- Subject: Re: Volume data in 16bit integer data
- From: Joe Chang (ììí) <email@hidden>
- Date: Thu, 7 Feb 2002 23:32:44 +0900
OK.
Suppose I convert 16bit data into 32bit float (0.0~1.0), and send it
to the device. What is actually sent to the device?
I guess it's not the 32bit float (0.0~1.0) value. It's converted into
something else which the device can understand.
(But please remember, that this data will NOT actually
change the volume factor of the device, but change its setting.)
The device I'm testing is a USB audio interface.
We don't have our own driver.
The Apple's generic USB audio driver works well for it.
I think the point is to know what Apple's USB audio driver
does to send 32bit volume data to the device.
Thanks Jeff!
Joe.
On Thursday, February 7, 2002, at 12:10 PM, Jeff Moore wrote:
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.
_______________________________________________
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.