1

从一开始,我单击“开始”开始录制,但该freeBlocks功能会导致internal error.

此错误有时会发生,但有时不会。

如何解决?

void QWindowsAudioInput::freeBlocks(WAVEHDR* blockArray)
{
    WAVEHDR* blocks = blockArray;

    int count = buffer_size/period_size;

    for(int i = 0; i < count; i++) {
        waveInUnprepareHeader(hWaveIn,blocks, sizeof(WAVEHDR));
        blocks++;//The error stuck in the line
    }
    HeapFree(GetProcessHeap(), 0, blockArray);
}

在程序中记录代码:

QIODevice* m_audioInputIODevice=NULL;
int readNum = m_audioInputIODevice->read(sAudio,BUFSIZE);
4

0 回答 0