开发者

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 erro开发者_JS百科r about the format.

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

thanks


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜