Re: [問題] iPhone麥克風錄音即時將封包轉成iLBC格式
※ 引述《wayneshiau (Wayne)》之銘言:
: 目前需要開發一個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;
以上四個參數似乎不需要設定
http://stackoverflow.com/questions/33614276/ios-ilbc-codec-using-audio-units
http://lists.apple.com/archives/coreaudio-api/2004/Nov/msg00055.html
'insz' 代表 kAudioConverterErr_InvalidInputSize
也就是input Format 那邊的資料格式有問題。
可以檢查看看input 那邊對不對
: dstFormat.mFormatFlags = 0;
: 不知道有沒有高手可以幫忙解惑?
: 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.225.48.200
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1462165894.A.860.html
推
05/02 15:50, , 1F
05/02 15:50, 1F
→
05/02 15:53, , 2F
05/02 15:53, 2F
→
05/02 15:53, , 3F
05/02 15:53, 3F
→
05/02 15:53, , 4F
05/02 15:53, 4F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):