initialize audiounit with kAudioFormatiLBC

£可爱£侵袭症+ 提交于 2019-12-13 05:24:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!