• 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: Mixing 16Khz, 8 bit audio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing 16Khz, 8 bit audio


  • Subject: Re: Mixing 16Khz, 8 bit audio
  • From: "Stephen F. Booth" <email@hidden>
  • Date: Tue, 21 Sep 2010 07:30:42 -0700

It looks like your ASBD might not be correct:
 
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;

For 8 bit packed audio, non-interleaved, mFramesPerPacket = mBytesPerPacket = mBytesPerFrame = 1.

The format as you have it now specifies:

AudioStreamBasicDescription:  2 ch,  16000 Hz, 'lpcm' (0x0000002C) 8-bit little-endian signed integer, packed in 2 bytes low-aligned, deinterleaved


Stephen
 
 
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

  • Follow-Ups:
    • Re: Mixing 16Khz, 8 bit audio
      • From: Aran Mulholland <email@hidden>
References: 
 >Mixing 16Khz, 8 bit audio (From: Aran Mulholland <email@hidden>)

  • Prev by Date: RE: Mixing 16Khz, 8 bit audio
  • Next by Date: Re: Mixing 16Khz, 8 bit audio
  • Previous by thread: RE: Mixing 16Khz, 8 bit audio
  • Next by thread: Re: Mixing 16Khz, 8 bit audio
  • Index(es):
    • Date
    • Thread