search for: pspeexhdr

Displaying 4 results from an estimated 4 matches for "pspeexhdr".

2004 Aug 06
1
C++ wrapper for speex
Ronald, I suggest we take this discussion off the list after this post. I don't see any problems with your code. However, I can make a few suggestions: 1) If you replace the lines: pSpeexHdr->lpData = (char*)pSound; pSpeexHdr->dwBufferLength = decodedSamples * sizeof(short); with: pSpeexHdr->lpData = lpHdr->lpData; pSpeexHdr->dwBufferLength = lpHdr->dwBufferLength; does it sound right? If not, your problem is not with the encoding or decoding. 2) Try checking the...
2004 Aug 06
2
C++ wrapper for speex
...dec.decode(compressed, clen); // Prepare decoded data for WAV BYTE pSound = new BYTE[decodedSamples * sizeof(short)]; memcpy(pSound, (BYTE*)dec.getOutput(), decodedSamples * sizeof(short)); // Create and initialise the WAVEHDR structure WAVEHDR* pSpeexHdr = new WAVEHDR; pSpeexHdr->lpData = (char*)pSound; pSpeexHdr->dwBufferLength = decodedSamples * sizeof(short); pSpeexHdr->dwFlags = 0L; pSpeexHdr->dwLoops = 0L; // output audio to speaker m_Player->PostThreadMessage...
2004 Aug 06
1
C++ wrapper for speex
...empts.) i'm particularly interested with real-time audio and i have an event handler that captures audio samples like the ff: void CRecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; if(lpHdr) { WAVEHDR* pSpeexHdr = new WAVEHDR; BYTE * pSound = new BYTE[lpHdr->dwBufferLength]; memcpy(pSound,lpHdr->lpData,lpHdr->dwBufferLength); pSpeexHdr->lpData = (char*)pSound;...
2004 Aug 06
0
C++ wrapper for speex
...ticularly interested with real-time audio and i > have an event handler that captures audio samples like > the ff: > > void CRecordSound::OnSoundData(WPARAM wParam, LPARAM > lParam) > { > LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; > > if(lpHdr) > { > WAVEHDR* pSpeexHdr = new WAVEHDR; > > BYTE * pSound = new BYTE[lpHdr->dwBufferLength]; > memcpy(pSound,lpHdr->lpData,lpHdr->dwBufferLength); > > pSpeexHdr->lpData = (char*)pSound; > pSpeexHdr->dwBufferLength = lpHdr->dwBufferLength; > pSpeexHdr->dwF...