objective c - Fail Parsing M4A, AAC file with Apple Audio File Stream Services, iOS 7 -


I am using this tutorial and this project to stream audio from NSInputStream, which is obtained by:

  - (zero) session: didReiveiveStream: withName: fromPeer:  

MCSession Representative method. After that, it opens a new audio file stream (TDAudioFileStreamer / Classes / AudioFileStream.m: 39):

  OSStatus err = Open the audio filestream ((__ bridge zero *), TDODOfileStreamProperty Listener, TDUDOfileStreamPacketsLaister, 0, & amp; _audioFileStreamID);  

Then read the bytes from NSInputStream and try parsing (TDAudioFileStreamer / Classes / AudioFileStream.m: 98):

  err = AudioFileStreamParseBytes (Self .audioFileStreamID, length, data, kAudioFileStreamParseFlag_Discontinuity);  

or:

  err = audiofilestreamperbirds (self.audioFileStreamID, length, data, 0);  

Depending on the data flow.

And finally, fill the audioquake buffer with the data parsed in this playback (I think - TDAudioFileStreamer / Classes / TDAudioQueueFiller.m). ).

This works very well for MP3 format files, but with the other formats when trying to parse the byte, the "unsupported file format" error is detected.

Stream services support many formats and they are listed in this link :, but only works with MP3 for me.

I was also trying to open the audio file stream, and send an M4A or AAC file:

  OSStatus err = audioFileStreamOpen ((__ bridge zero * ) Self, TDAudioFileStreamPropertyListener, TDAudioFileStreamPacketsListener, kAudioFileAAC_ADTSType, & amp; _audioFileStreamID);  

Where kAudioFileAAC_ADTSType is a type of file that will be streamed, in this way, the "unsupported file format error" disappears, but the application crashes and gets a new error Enter image details here

It says: Io: LPC and customers: AAC.

  • Does anyone know what that means?
  • Expecting Qi AAC format file?
  • Why is LPCM (linear pulse code modulation), I am sending LPCM not M4A or AAC?

order stream / parse M4A to audiofilestream , m4a for streaming The file needs to be customized.

This means that the header should be in front of the file and it has the right information that will allow your parser to do its job.

Some encoders will optimize M4A for you, but some encoders will be used. For example, if you create an M4A file with iTunes Player, simply by right-clicking and choosing "Create AAC version", which will create an M4A file that is optimized for streaming.

You can test it by using


Comments

  1. Awesome work I really like that, So if you want to convert your aac, aiv, mov file to other format then use this online converter;

    Best File Converter

    ReplyDelete
  2. This converter has great potential to transfer one file to other file.


    Gif to Swf

    3gp to Jpeg

    Tiff to Png

    Wmv to Flv

    Avi to Ipad

    ReplyDelete

Post a Comment

Popular posts from this blog

c++ - Cmake produces file extensions in static library archives -

c# - Roxy file manager in MVC doesn't accept session path -

c# - Check if a NumericUpDown has no value -