RE: Mixing 16Khz, 8 bit audio
RE: Mixing 16Khz, 8 bit audio
- Subject: RE: Mixing 16Khz, 8 bit audio
- From: Stéphane Beauchemin <email@hidden>
- Date: Tue, 21 Sep 2010 09:57:15 -0400
- Thread-topic: Mixing 16Khz, 8 bit audio
I find that kAudioUnitScope_Output and kAudioUnitScope_Input are a bit misleading. When you are setting kAudioUnitScope_Input, you tell the outputMixerUnit what kind format you going to feed to it. The "output" of the outputMixerUnit will be connected to your remoteIOUnit, so format of the output will be determined by the connection in between the remoteIOUnit and your outputMixerUnit. So I think that what you want to do is to set the format of the kAudioUnitScope_Input not the kAudioUnitScope_Output (even if your outputMixerUnit is the output of the graph :-) )
Stephane
-----Original Message-----
From: coreaudio-api-bounces+sbeauchemin=email@hidden [mailto:coreaudio-api-bounces+sbeauchemin=email@hidden] On Behalf Of Aran Mulholland
Sent: September-21-10 9:13 AM
To: Core Audio Mailing List
Subject: Mixing 16Khz, 8 bit audio
Hey All,
Just wondering whether it is possible to set up a multi channel mixer
on the iPhone to accept a format like this: (its meant to be 16Khz, 8
bit, non interleaved stereo)
nonInterleavedAudioFormat.mSampleRate = 16000.0;
nonInterleavedAudioFormat.mFormatID = kAudioFormatLinearPCM;
nonInterleavedAudioFormat.mFormatFlags =
kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsNonInterleaved |
kAudioFormatFlagIsPacked;
nonInterleavedAudioFormat.mFramesPerPacket = 1;
nonInterleavedAudioFormat.mChannelsPerFrame = 2;
nonInterleavedAudioFormat.mBitsPerChannel = 8;
nonInterleavedAudioFormat.mBytesPerPacket = 2;
nonInterleavedAudioFormat.mBytesPerFrame = 2;
When I do a
err = AudioUnitSetProperty(outputMixerUnit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Output,
0,
&nonInterleavedAudioFormat,
sizeof(nonInterleavedAudioFormat));
I get the dreaded -10868 (kAudioUnitErr_FormatNotSupported)
It is fine setting the input however :
err = AudioUnitSetProperty(outputMixerUnit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input,
0,
&nonInterleavedAudioFormat,
sizeof(nonInterleavedAudioFormat));
I'd really like to know what I'm doing wrong, I usually spend more
time setting up the AUGraph and connections than coding my Audio.
What formats are supported? Setting the RemoteIO's input with the same
input is allowed.
err = AudioUnitSetProperty(remoteIOUnit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input,
0,
&nonInterleavedAudioFormat,
sizeof(nonInterleavedAudioFormat));
Thanks
Aran.
_______________________________________________
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
_______________________________________________
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