• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ExtAudioFile - mono to stereo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFile - mono to stereo


  • Subject: Re: ExtAudioFile - mono to stereo
  • From: William Stewart <email@hidden>
  • Date: Thu, 19 Aug 2010 17:42:18 -0700

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.
 
http://lists.apple.com/archives/coreaudio-api/2010/Aug/msg00069.html
 
http://lists.apple.com/archives/coreaudio-api/2010/Aug/msg00068.html
 
 
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: This email sent to email@hidden
  • Follow-Ups:
    • RE: ExtAudioFile - mono to stereo
      • From: "Edwards, Waverly" <email@hidden>
    • Re: ExtAudioFile - mono to stereo
      • From: Mo DeJong <email@hidden>
References: 
 >ExtAudioFile - mono to stereo (From: "Edwards, Waverly" <email@hidden>)

  • Prev by Date: iPod Touch, headset and kAudioSessionBeginInterruption
  • Next by Date: Re: ExtAudioFile - mono to stereo
  • Previous by thread: ExtAudioFile - mono to stereo
  • Next by thread: Re: ExtAudioFile - mono to stereo
  • Index(es):
    • Date
    • Thread