Re: Using an AudioConverter to convert mono to stereo?
Re: Using an AudioConverter to convert mono to stereo?
- Subject: Re: Using an AudioConverter to convert mono to stereo?
- From: Jeff Moore <email@hidden>
- Date: Tue, 8 Feb 2005 12:38:01 -0800
You need to set the kAudioConverterChannelMap property on the converter
to replicate the mono channel to the stereo destination.
The channel map property takes an array of SInt32s. The size of the
array is the number of output channels, and each element specifies
which input channel's data is routed to that output channel (using a
0-based index of the input channels), or -1 if no input channel is to
be routed to that output channel. The default behavior is as follows.
I = number of input channels, O = number of output channels. When I >
O, the first O inputs are routed to the first O outputs, and the
remaining puts discarded. When O > I, the first I inputs are routed to
the first O outputs, and the remaining outputs are zeroed.
On Feb 8, 2005, at 12:10 PM, Simon Fraser wrote:
I have an Audio Converter hooked up via my Audio Unit's render
callback
to perform on-the-fly conversions of audio sample formats and sample
frequencies. This is working fine to upsample 22.05kHz audio to
44.1kHz,
and to convert signed 16-bit ints to floats.
However, if the input is mono (mChannelsPerFrame = 1) but the
requested
output is stereo (2 channels), the Audio Converter doesn't put the
audio
in both channels; all the sound comes out of the left speaker.
Do I have to do something more to get sound into both channels?
Thanks for any info.
Simon
_______________________________________________
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
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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