• 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
Do I Need to Set the ASBD of a FilePlayer Audio Unit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Do I Need to Set the ASBD of a FilePlayer Audio Unit?


  • Subject: Do I Need to Set the ASBD of a FilePlayer Audio Unit?
  • From: n ketter <email@hidden>
  • Date: Mon, 24 Dec 2012 20:36:45 -0800

I've specified and instantiated two Audio Units: a multichannel mixer unit and a generator of subtype AudioFilePlayer.

I would have thought I needed to set the ASBD of the filePlayer's output to match the ASBD I set for the mixer input. However when I attempt to set the filePlayer's output I get a kAudioUnitErr_FormatNotSupported (-10868) error.

Here's the stream format I set on the mixer input (successfully) and am also trying to set on the filePlayer (it's the monostream format copied from Apple's "mixerhost" sample project):


Sample Rate:              44100
Format ID:                 lpcm
Format Flags:                 C
Bytes per Packet:             2
Frames per Packet:            1
Bytes per Frame:              2
Channels per Frame:           1
Bits per Channel:            16

In the course of troubleshooting this I queried the filePlayer AU for the format it is 'natively' set to. This is what's returned:


Sample Rate:              44100
Format ID:                 lpcm
Format Flags:                29
Bytes per Packet:             4
Frames per Packet:            1
Bytes per Frame:              4
Channels per Frame:           2
Bits per Channel:            32

All the example code I've found sends the output of the filePlayer unit to an effect unit and set the filePlayer's output to match the ASBD set for the effect unit. Given I have no effect unit it seems like setting the filePlayer's output to the mixer input's ASBD would be the correct - and required - thing to do.

Clearly I'm missing something. 

Thanks in advance!


 _______________________________________________
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: Do I Need to Set the ASBD of a FilePlayer Audio Unit?
      • From: Tim Kemp <email@hidden>
  • Prev by Date: Change Rate and Write To File...
  • Next by Date: [no subject]
  • Previous by thread: Change Rate and Write To File...
  • Next by thread: Re: Do I Need to Set the ASBD of a FilePlayer Audio Unit?
  • Index(es):
    • Date
    • Thread