问题
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
回答1:
You can't process a compressed stream format such as kAudioFormatiLBC though Audio Units or Graphs, this is not supported.
来源:https://stackoverflow.com/questions/7090088/initialize-audiounit-with-kaudioformatilbc