RE: ExtAudioFile - mono to stereo
RE: ExtAudioFile - mono to stereo
- Subject: RE: ExtAudioFile - mono to stereo
- From: "Edwards, Waverly" <email@hidden>
- Date: Fri, 20 Aug 2010 16:59:59 -0500
- Acceptlanguage: en-US
- Thread-topic: ExtAudioFile - mono to stereo
I have seen an example that Mo DeJong created.
I'm still trying to wrap my head around the possibility that I can change the
format that I read into the buffer, regardless of the files actual
format.
I'm hoping to go home and try this out so I can put the
pieces of my puzzle together.
Thank you,
W.
You can - you use the AudioConverter (which is part of the
ExtAudioFile's implementation) and you tell it to map the 1 channel source of
the file, to a 2 channel client data format (you want your data in stereo). So,
you:
- set the client format of the ext audio file to stereo
- get the audio converter from the ext audio file
- set the channel map of the audio converter (this should be set to { 0, 0
} = which says take the first channel of the input (there is only 1, the source
file) and place it in each of the destination channels of the client format of
the ext audio file
sorry for the misdirection earlier
BIll
On Aug 19, 2010, at 11:10 AM, Edwards, Waverly wrote:
Is it possible to
read a mono formatted audio file and have it directly read into a stereo
buffer?
I am currently
reading a mono file but I *always* want my buffer to be filled in
stereo. I wish to
have the right
channel be the same as the left channel.
Currently I am
reading the entire mono channel file into a buffer. I
then read
my mono channel buffer into a stereo buffer and discard the mono
buffer.
for ( indx =
0; indx <= numSamples -1 ; indx++ )
{
stereoChannel[
indx][_leftChannel] = monoChannel[indx];
stereoChannel[ indx][_rightChannel]
= monoChannel[indx];
}
Is there a direct
way to convert the mono channel to stereo, filling both channels with the
original mono data?
I searched and saw
a posting on Aug 9th where William stated you cannot and Doug said you
could.
If you can, I am
not understanding how.
Thank
you,
W.
_______________________________________________ Do
not post admin requests to the list. They will be ignored. Coreaudio-api
mailing list (email@hidden) Help/Unsubscribe/Update
your Subscription:
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden