search for: dwbufferlength

Displaying 8 results from an estimated 8 matches for "dwbufferlength".

Did you mean: bufferlength
2005 Nov 05
1
buffer overruns for small files
...zero, I overflow the buffer and crash on ov_clear. These are my TRACE statements: >= 10kb: Opening Audio File 'no_0.ogg' vi->channels = '2' vi->rate = '44100' pcmTotal = '15341' pcmTotal * vi->channels * 2 = '61364' BufferSize = '61364' dwBufferLength = '61364' BufferSize = '61364' dwBufferLength - BufferSize = '0' ------------ < 10kb: Opening Audio File 'Steel guitar_4.ogg' vi->channels = '2' vi->rate = '44100' pcmTotal = '9876' pcmTotal * vi->channels * 2 = '39504' Bu...
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 error state of the classes after each method call, and b...
2004 Aug 06
1
C++ wrapper for speex
...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->dwFlags = 0L;...
2004 Aug 06
0
C++ wrapper for speex
...t 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->dwFlags = 0L; > pSpeexHdr->dwLoops = 0L; > > m_Player->PostThre...
2004 Aug 06
2
C++ wrapper for speex
...ve 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.getOutputLength(); int speechDetected = enc.getSpeechDetected();...
2007 Nov 04
3
WaveIn/WaveOut and Speex
Hello, I know my question has been asked before because I spent the last week searching the web for how to use Speex in combination with WaveIn/WaveOut and I ran into a few posts, but none of them answer the question. There is still a lot of confusion how to use WaveIn/WaveOut and Speex by junior developers such as myself. Even after examining code for SpeexDec and SpeexEnc, I cannot get clear
2007 Nov 04
2
WaveIn/WaveOut and Speex
Thank you for such a quick response. The only reason I started with Char buffers is because WaveIn and WaveOut on Windows XP accept/emit WAVEHDR structures, which store audio data in LPSTR, which is Char*. typedef struct { LPSTR lpData; DWORD dwBufferLength; ... } WAVEHDR; When I was going from Char to float and back looked very wrong to me as well, but I was just not sure (and still am) how to translate the Char* audio stream generated by WaveIn to a format that can be understood by Speex. Would using speex_decode_int and speex_encode_int instead...
2010 Feb 19
0
Wine release 1.1.39
...mciavi: Support the MCI_TEST flag. mciavi: Step is like Seek. mciavi: Support more MCI_STATUS queries. winex11: Initialize KeyPressEvent for XmbLookupString. winex11: Add vkey codes for functions keys upto F24. winmm: dwBytesRecorded controls how much is played, not dwBufferLength. Kusanagi Kouichi (7): notepad: Increase the text limit. winex11.drv: Private copy of a result string is unnecessary. winex11.drv: Simplify X11DRV_ImmSetInternalString. winex11.drv: Fold X11DRV_ImmSetOpenStatus into XIMPreEditDoneCallback. user32: Consolidate empty st...