Alex
Alex

Reputation: 385

initialize audiounit with kAudioFormatiLBC

i'm trying to initialize an AudioUnit to record audio using ilbc. Unfortunatly i need to use ilbc as codec and i cannot choose a different one.
after reading the documentation and forums I found that the correct stream descriptor for using ilbc should be something like:

streamDesc.mSampleRate = 8000.0;  
streamDesc.mFormatID         = kAudioFormatiLBC;  
streamDesc.mChannelsPerFrame = 1;

then I use:

AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
                           0, NULL, &size, &streamDesc);

to fill the empty field in the structure, but i always get an error about the format.

anyone has some idea on the right parameters for the streamDesc?

thanks

Upvotes: 0

Views: 967

Answers (1)

Alex
Alex

Reputation: 385

You can't process a compressed stream format such as kAudioFormatiLBC though Audio Units or Graphs, this is not supported.

Upvotes: 2

Related Questions