• 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
Playing 4 channel AIF file with File Player Audio Unit on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Playing 4 channel AIF file with File Player Audio Unit on iOS


  • Subject: Playing 4 channel AIF file with File Player Audio Unit on iOS
  • From: Jim McGowan <email@hidden>
  • Date: Thu, 14 Nov 2013 14:11:25 +0800

Hi,

I’m trying to play a 4 channel AIF file with the file player Audio Unit (in an AUGraph) on iOS 7, but can’t get it to play all 4 channels.  I’m setting up the graph like this:

RemoteIO <- MultiChannelMixer <- AudioFilePlayer

When I hook everything together without specifying any format descriptions or channel layouts, I get 2 of the 4 channels playing, one on the left speaker, one on the right.

I tried to set the output stream format of the file player unit to match the format of the file, like this:

    AudioStreamBasicDescription fileASBD;
    UInt32 sizeOfASBD = sizeof(fileASBD);
    AudioFileGetProperty(musicFileID, kAudioFilePropertyDataFormat, &sizeOfASBD, &fileASBD);

    AudioUnitSetProperty(filePlayerUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &fileASBD, sizeOfASBD);

But the AudioUnitSetProperty() call returns -10868 (kAudioUnitErr_FormatNotSupported).

I also tried setting the channel layout of the file player output to quadrophonic, like this:

    AudioChannelLayout quadChannelLayout;
    quadChannelLayout.mChannelLayoutTag = kAudioChannelLayoutTag_AudioUnit_4;
    UInt32 sizeOfChannelLayout = sizeof(quadChannelLayout);

    AudioUnitSetProperty (filePlayerUnit, kAudioUnitProperty_AudioChannelLayout, kAudioUnitScope_Output, 0, &quadChannelLayout, sizeOfChannelLayout);

But the AudioUnitSetProperty() call this time returns -10851 (kAudioUnitErr_InvalidPropertyValue).

So is the file player AU not capable of playing files with more than 2 channels?  Or have I missed something in my setup?

Thanks,

Jim
 _______________________________________________
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


  • Prev by Date: Re: Hosting 'aumi' Midi Effect Audio Units
  • Next by Date: Overriding MIDI class driver?
  • Previous by thread: Re: Hosting 'aumi' Midi Effect Audio Units
  • Next by thread: Overriding MIDI class driver?
  • Index(es):
    • Date
    • Thread