• 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
MP3 Playback through Audio Units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MP3 Playback through Audio Units


  • Subject: MP3 Playback through Audio Units
  • From: Russ Fellman <email@hidden>
  • Date: Fri, 24 Apr 2009 21:17:28 -0400

Hello,

On iPhone SDK....

I am trying to playback an MP3 file using two connected audio units, a
mixer and an output.
I had them set up for wav playback using a buffer and render callback
from the mixer to call
the packets from the buffer. Wavs worked fine. The wav was manually
delcared using these lines...

AudioStreamBasicDescription audioFormat;
// Describe format
	audioFormat.mSampleRate			= 44100.00;
	audioFormat.mFormatID			= kAudioFormatLinearPCM;              //
kAudioFormatMPEGLayer3?
	audioFormat.mFormatFlags		= kAudioFormatFlagIsSignedInteger |
kAudioFormatFlagIsPacked;
	audioFormat.mFramesPerPacket	= 1;
	audioFormat.mChannelsPerFrame	= 2;
	audioFormat.mBitsPerChannel		= 16;
	audioFormat.mBytesPerPacket		= 4;
	audioFormat.mBytesPerFrame		= 4;

Is this the best way to go about it, or should I open the MP3 file and
"get" some properties? What would I need?

What would I need to change for MP3 playback? And can a buffer still
be used with this? What would differences
in a wav buffer and mp3 buffer be? Thanks!

-Russ Fellman
 _______________________________________________
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: MP3 Playback through Audio Units
      • From: Nathan Peel <email@hidden>
  • Prev by Date: Re: kAudioUnitType_FormatConverter and locking the iPhone
  • Next by Date: Audio queues...again
  • Previous by thread: Re: kAudioUnitType_FormatConverter and locking the iPhone
  • Next by thread: Re: MP3 Playback through Audio Units
  • Index(es):
    • Date
    • Thread