[問題] iPhone麥克風錄音即時將封包轉成iLBC格式
目前需要開發一個App其中包含利用麥克風收音並且即時將聲音傳給server並播放的功能。
但是server是接收iLBC的格式,依照我目前的理解應該是要將麥克風所錄到的linear PCM格式轉換成iLBC後送出~
也參考過此偏文章:http://www.it610.com/article/4428805.htm
(但是他是將聲音轉換成AAC的格式)
但是依照上述的文章將AAC改成iLBC後
在AudioConverterFillComplexBuffer 這行都會出現'insz'這樣的錯誤
以下是我設定iLBC的格式
dstFormat.mSampleRate = 8000.0;
dstFormat.mFormatID = kAudioFormatiLBC ;
dstFormat.mChannelsPerFrame = 1;
dstFormat.mBytesPerPacket = 50;50;
dstFormat.mFramesPerPacket = 240;
dstFormat.mBytesPerFrame = 0;
dstFormat.mBitsPerChannel = 0;
dstFormat.mFormatFlags = 0;
不知道有沒有高手可以幫忙解惑?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.36.249.17
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1462159342.A.F40.html
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):