Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexible output formats for AudioFileWriter #12

Closed
alexbw opened this issue Apr 27, 2012 · 2 comments
Closed

Flexible output formats for AudioFileWriter #12

alexbw opened this issue Apr 27, 2012 · 2 comments

Comments

@alexbw
Copy link
Owner

alexbw commented Apr 27, 2012

Right now, only writes to MP4. Should be able to specify any output format available

@coryalder
Copy link
Contributor

A note on this subject. Manually changing the output format to mp3 like so:

AudioFileWriter.mm: 87

AudioStreamBasicDescription outputFileDesc = {44100.0, kAudioFormatMPEGLayer3, 0, 0, 1024, 0, 2, 0, 0};
CheckError(ExtAudioFileCreateWithURL(audioFileRef, kAudioFileMP3Type, &outputFileDesc, NULL, 0, &_outputFile), "Creating file");

Seems to be producing corrupted files. They won't open in QuickTime Player on my Mac. Not sure what's happening, but I thought I'd mention it since there was already an open issue on the subject.

Edit: oh, apparently iOS doesn't have a built in mp3 encoder? (http://stackoverflow.com/questions/6179481/audiostreambasicdescription-for-mp3)

Edit 2: yup. my mistake: (https://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2 table 1-2).

@alexbw
Copy link
Owner Author

alexbw commented Nov 15, 2013

This is not a thing I anticipate that I will be doing, unfortunately

@alexbw alexbw closed this as completed Nov 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants