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 14:41:51 -0400
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?
Help?
Thanks Jimmy D.
-----Original Message-----
From: Michael C. Thornburgh [
mailto:email@hidden]
Sent: Thursday, April 25, 2002 6:34 PM
To: email@hidden
Subject: Re: Different number of channels in IOProc
the input and output buffers represent the same amount of
time passing. the output buffer will be half as big as
the input buffer (in bytes), but will have the same number
of frames (each frame will be half as big, containing samples
for only two channels instead of for four).
i use kAudioDevicePropertyBufferFrameSize exclusively for
setting the buffer sizes on devices.
without knowing specifics about your device, a device with
four input channels _could_ present that as two separate streams
of two channels each (or even other crazy configurations),
in which case there'd be two input buffers each with frames
two samples wide, and one output buffer with frames two samples
wide.
regardless of how the samples are organized, for every sample
period, there will be twice as many samples on input as on output,
so mixing or discarding will be necessary.
-mike
>
From: Jim Dolan <email@hidden>
>
To: "CoreAudio (E-mail)" <email@hidden>
>
Subject: Different number of channels in IOProc
>
Date: Thu, 25 Apr 2002 10:37:20 -0400
>
>
Hi -
>
>
I have an audio device which shows up as a single device with 4 input and
2
>
output channels.
>
This case means that a single IOProc will handle input and output.
>
Can I set the buffer size of the input side of the device differently from
>
the output side of the device?
>
>
This I assume would be the only way to fill the entire output buffer with
4
>
channels of input ( assuming that I sum 3 to 1 and 4 to 2)?
>
If I can't set the sizes differently what can I do? Choose 1&2 or 3&4
>
>
Thanks Jimmy D.
_______________________________________________
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.