diff --git a/src/contrib/waveout/WaveOut.cpp b/src/contrib/waveout/WaveOut.cpp index 56341cf24..8143e457a 100644 --- a/src/contrib/waveout/WaveOut.cpp +++ b/src/contrib/waveout/WaveOut.cpp @@ -65,9 +65,8 @@ bool WaveOut::Open(void) } m_Buffers = (WAVEHDR *)VirtualAlloc(NULL, m_NumBuffers * sizeof(WAVEHDR), MEM_COMMIT, PAGE_READWRITE); -// m_dwBufferSize = m_BlockSize * m_NumBuffers; - - unsigned int bytesPerSample = m_waveFormatPCMEx.Format.nChannels*m_waveFormatPCMEx.Format.wBitsPerSample/16; + + unsigned int bytesPerSample = m_waveFormatPCMEx.Format.wBitsPerSample/8; m_dwBufferSize = m_BlockSize*bytesPerSample; @@ -76,9 +75,8 @@ bool WaveOut::Open(void) for(unsigned long x=0; xm_pfAudioBuffer[x*m_BlockSize]); m_Buffers[x].dwUser = x; m_Buffers[x].dwBytesRecorded = 0; m_Buffers[x].dwFlags = 0; @@ -105,20 +103,17 @@ bool WaveOut::Close(void) { m_Playing = false; -again: - if(waveOutReset(m_waveHandle) == MMSYSERR_NOERROR) - { - for(unsigned long x=0; x