RE: Different number of channels in IOProc
RE: Different number of channels in IOProc
- Subject: RE: Different number of channels in IOProc
- From: Jim Dolan <email@hidden>
- Date: Fri, 26 Apr 2002 16:03:37 -0400
I am getting the size from the bufferlist's in the IOProc -
If this is a bug - Do you think it is the device driver or is it a CoreAudio
problem - The device I am using is a Tascam US-428 which has its own driver.
This sucks because many of my methods require the buffersize in bytes!
This means that I have to redo a lot tricky calculations to ensure that it
is working correctly...
Jimmy D.
-----Original Message-----
From: Jeff Moore [
mailto:email@hidden]
Sent: Friday, April 26, 2002 3:41 PM
To: CoreAudio API
Subject: Re: Different number of channels in IOProc
on 4/26/02 11:41 AM, Jim Dolan <email@hidden> wrote:
>
This device is a single device whose input has 1 stream of 4 channels and
>
the output has 1 stream of two channels.
>
I am now setting the frame size for the input and output sides each to
4096
>
When I ask the output side for the buffer size in bytes I get back 64k -
>
since there are only two channels I am expecting 32k for output but 64k
for
>
input - ( 4096 * numchannels * sizeof(32 bit float) )Is it not reliable to
>
do this? Do I need to always get the frame size and multiply by the number
>
of channels? Why is it reporting this way?
The best way of getting the buffer sizes you will see in your IOProc is
kAudioDevicePropertyStreamConfiguration. This gets you an AudioBufferList
filled out like what you will see in the IOProc.
The second best way is to get the current stream description for the stream,
and multiply the buffer size in frames by the mBytesPerFrame value in the
stream description.
Note that to be complete, you really have to do this on a per stream basis.
Assuming a device has only one stream will hurt you badly, especially when
dealing with pro hardware.
The third best way is to use kAudioDevicePropertyBufferSize, but you've
identified what appears to me to be a bug. Could you please file it in bug
reporter? Thanks!
--
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.