search for: lpwavehdr

Displaying 6 results from an estimated 6 matches for "lpwavehdr".

2008 Sep 10
1
Bug in winealsa.drv? Incredibly specific oddity
...mes after a mile, sometimes 30, after figuring out I could debug just the wave classes, I think I've found a clue. It keeps hanging on wodPlayer_NotifyCompletions and just waiting forever when it locks up. Here's the interesting part though... It only locks up when the difference between lpWaveHdr->reserved and wwo->dwPlayedTotal is EXACTLY 940 [Shocked] I've repeated this over 4 times. How I even caught it... lol. I wrote a parser to verify it wasn't a fluke, on the first run, there were 446 instances of "wodPlayer_NotifyCompletions" and not one had a value of &q...
2004 Aug 06
2
C++ wrapper for speex
...re's member lpData, and this variable is of LPSTR type. if you have the time, can you please check on my test code below and see where i could be having problems with. (this is the handler that processes captured audio) LRESULT CRecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; int buflen = lpHdr->dwBufferLength; //160 float * buf = toFloat(lpHdr->lpData, buflen); // Encode some audio int nRet = enc.encode(buf, buflen); unsigned char *compressed = enc.getOutput(); int clen = enc.getOu...
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...= 0; m_WaveFormatEx.nSamplesPerSec = 8000; m_WaveFormatEx.nBlockAlign = 1; m_WaveFormatEx.nAvgBytesPerSec = 8000; The recording is as follows :- When the buffer(size = 2000 bytes) gets filled with sound data a function with the body shown below is called. LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; if(lpHdr->dwBytesRecorded==0 || lpHdr==NULL) return ERROR_SUCCESS; ::waveInUnprepareHeader(m_hRecord, lpHdr, sizeof(WAVEHDR)); Here lpHdr->lpData contains the audio data in a character array. Now here I want to use Speex codec for encoding the data so...
2004 Aug 06
1
C++ wrapper for speex
...done it and i supposed i could do it also, but i'm really confused now with all my failed attempts.) 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);...
2004 Aug 06
0
C++ wrapper for speex
...but i'm really confused now with all my failed > attempts.) > > 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
1
C++ wrapper for speex
...> LPSTR type. > > if you have the time, can you please check on my test > code below and see where i could be having problems > with. (this is the handler that processes captured > audio) > > LRESULT CRecordSound::OnSoundData(WPARAM wParam, > LPARAM lParam) > { > LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; > > int buflen = lpHdr->dwBufferLength; //160 > float * buf = toFloat(lpHdr->lpData, buflen); > > // Encode some audio > int nRet = enc.encode(buf, buflen); > unsigned char *compressed = enc.getOutput(); > int clen = enc.getOutp...