• 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: "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.


From: William Stewart [mailto:email@hidden]
Sent: Thursday, August 19, 2010 8:42 PM
To: Edwards, Waverly
Cc: 'coreaudio-api API'
Subject: Re: ExtAudioFile - mono to stereo

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:

 _______________________________________________
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: William Stewart <email@hidden>
References: 
 >ExtAudioFile - mono to stereo (From: "Edwards, Waverly" <email@hidden>)
 >Re: ExtAudioFile - mono to stereo (From: William Stewart <email@hidden>)

  • Prev by Date: RE: ExtAudioFile - mono to stereo
  • Next by Date: AudioUnitGetProperty Thread Safety
  • Previous by thread: RE: ExtAudioFile - mono to stereo
  • Next by thread: Re: ExtAudioFile - mono to stereo
  • Index(es):
    • Date
    • Thread