format problems with ExtAudioFile
format problems with ExtAudioFile
- Subject: format problems with ExtAudioFile
- From: "thomas rettich" <email@hidden>
- Date: Mon, 30 Jan 2006 03:19:37 +0100
hi,
I am using the extaudiofile api for reading and writing files to disk. I've
experienced some problems when doing so that I have been able to solve
yet... so any help would really be appreciated:
as far as writing is concerned... I am calling ExtAudioFileWriteAsync on a
post render notification and write the iodata buffer to disk (compressed) .
this works fine as long as I specify 'caff' as the filetype. when I specify
any other format such as aiff or aac I get a format error.
this is the ABSD I filled out:
outputFormat.mSampleRate = 44100.;
outputFormat.mFormatID= kAudioFormatAppleIMA4;
outputFormat.mFormatFlags = 0;
outputFormat.mChannelsPerFrame = 2;
outputFormat.mBitsPerChannel = 0;
outputFormat.mFramesPerPacket= 64;
outputFormat.mBytesPerPacket = 68;
outputFormat.mBytesPerFrame = 0;
if I specify aiff or aac respectively, as the filetype (in
extaudiofilecreatenew), what fields of outputformat would I have to change ?
as far as reading is concerned I have encountered another problem... again
if I read from a 'caff' file things work fine. yet, as soon as I try to read
from an mp3 file (or any other file type) I get a format error (exception
thrown by AUConverterNew). I've tried specifying a different client data
format (lpcm), but this wouldn't help:
clientFormat.mSampleRate = 44100.;
clientFormat.mFormatID= 'lpcm';
clientFormat.mFormatFlags = kAudioFormatFlagIsBigEndian |
kAudioFormatFlagIsSignedInteger;
clientFormat.mChannelsPerFrame = 2;
clientFormat.mBitsPerChannel = 16;
clientFormat.mFramesPerPacket= 1;
clientFormat.mBytesPerPacket = 4;
clientFormat.mBytesPerFrame = 4;
again, can anyone provide me with hints about what values for what field
exactly have to be specified or what could be the solution to reading mp3
files from disk with extaudiofile ?
hope someone can help.
thanks,
Thomas
_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!
http://desktop.msn.de/ Jetzt gratis downloaden!
_______________________________________________
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