MP3 Playback through Audio Units
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