-1
我試圖採取實際時間(ms的分辨率)服用AudioBuffer樣品
我使用這個功能的音頻緩衝樣本,但它給我的錯誤。
AudioBufferList *bufferList = NULL;
AudioBuffer audioBuffer = bufferList->mBuffers[0];
int bufferSize = audioBuffer.mDataByteSize/sizeof(SInt32);
SInt32 *frame = audioBuffer.mData;
SInt32 signalInput[22050];
for(int i=0; i<bufferSize; i++)
{
SInt32 currentSample = frame[i];
*(signalInput +i) = currentSample;
NSLog(@"Total power was: %ld ",currentSample);
}
我在這裏弄錯了什麼? 我只需要得到音頻樣本。我不想要2頁的代碼(如在應用程序文檔中)
謝謝。
我有正確的,NULL我把它放在這裏是錯誤的。所以爲了實時獲取緩衝區數據(useconds/mseconds),我可以使用remoteIO?湖應用程序文檔充滿了這麼多種音頻的東西,所以你不知道什麼是最適合你和你真正需要的。我需要在微秒內獲得實時音頻信號。 – Curnelious