search for: lpdata

Displaying 16 results from an estimated 16 matches for "lpdata".

Did you mean: pdata
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 stat...
2012 Oct 25
2
WAVE PCM to OPUS and back
...m_opusEncoder = opus_encoder_create(48000, 2, OPUS_APPLICATION_AUDIO, &opusRes); m_opusDecoder = opus_decoder_create(48000, 2, &opusRes); unsigned char data[BUFSIZE]; opus_int32 dataLength = opus_encode(m_opusEncoder, (short*)Hdr->lpData, 80, data, BUFSIZE); dataLength = opus_decode(m_opusDecoder, (unsigned char*)data, dataLength, (short*)WaveHdrOut.lpData, BUFSIZE, 0); waveOutWrite(hWaveOut, &WaveHdrOut,sizeof(WAVEHDR)); -- Best regards, Stepan Melnichuk -------------- next part -----...
2004 Aug 06
2
C++ wrapper for speex
...oking for! i really cannot worry about container support at the moment because i'm working with real-time audio, and hopefully toward VoIP when everything else is in order. im using waveform to capture data from the microphone. the raw PCM sample is stored in the WAVEHDR structure'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 = (LPW...
2009 Jan 20
0
VoIP with wavefrom and speex
...e = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&quality); while(1) { for(i=0;i<160;i++) { if(n>=srclen) { speex_bits_destroy(&bits); speex_encoder_destroy(enc_state); return compr_length; } input[i] = source->lpData[n]; n++; } speex_bits_reset(&bits); speex_encode(enc_state,input, &bits); length = speex_bits_write(&bits, output, 200); compr_length = bwrite_data(dest,compr_length,length); //writes 2 Byte into dest memcpy(&dest[compr_length],output,length); compr_length += length...
2004 Aug 06
1
C++ wrapper for speex
...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;...
2004 Aug 06
0
C++ wrapper for speex
...t; 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->PostThreadMessage(WM_PLAYSOUND_PLAYBLOCK, > GetC...
2006 Nov 01
1
Integrating speex with VideoNet application: Constant background noise
...int quality =8; speex_bits_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); In my recording callback function LRESULT RecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { .... dataPtr = (char *)lpHdr ->lpData; dataSize = (int)lpHdr ->dwBytesRecorded; for(int k=0;k<FRAME_SIZE;k++) input[k] = dataPtr[k]; //input is float[FRAME_SIZE] speex_bits_reset(&bits); speex_encode(enc_state, input, &bits); encByte = speex_bits_write(&bits, cbits, 200); //s...
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...uffer(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 the encoding function is called (I am thankful to Tay YueWeng for the function). char *encode(char *buffer, int &encodeSize) { char *encodedBuffer = new char[RECBUFFER/2]...
2006 Nov 02
1
Integrating speex with VideoNet application: Constantbackground noise
...; speex_bits_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); In my recording callback function LRESULT RecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { .... dataPtr = (char *)lpHdr ->lpData; dataSize = (int)lpHdr ->dwBytesRecorded; for(int k=0;k<FRAME_SIZE;k++) input[k] = dataPtr[k]; //input is float[FRAME_SIZE] speex_bits_reset(&bits); speex_encode(enc_state, input, &bits); encByte = speex_bits_write(&bits, c...
2006 Oct 30
0
Integrating speex with VideoNet application: Constant background noise
...int quality =8; speex_bits_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); In my recording callback function LRESULT RecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { .... dataPtr = (char *)lpHdr ->lpData; dataSize = (int)lpHdr ->dwBytesRecorded; for(int k=0;k<FRAME_SIZE;k++) input[k] = dataPtr[k]; //input is float[FRAME_SIZE] speex_bits_reset(&bits); speex_encode(enc_state, input, &bits); encByte = speex_bits_write(&bits, cbits, 200); //s...
2006 Nov 05
1
Integrating speex with VideoNet application: Constantbackground noise
...ts_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); In my recording callback function LRESULT RecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { .... dataPtr = (char *)lpHdr ->lpData; dataSize = (int)lpHdr ->dwBytesRecorded; for(int k=0;k<FRAME_SIZE;k++) input[k] = dataPtr[k]; //input is float[FRAME_SIZE] speex_bits_reset(&bits); speex_encode(enc_state, input, &bits); encByte = speex_bits_writ...
2006 Dec 24
1
Integrating speex with VideoNet application: Constantbackground noise
...ts_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); In my recording callback function LRESULT RecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { .... dataPtr = (char *)lpHdr ->lpData; dataSize = (int)lpHdr ->dwBytesRecorded; for(int k=0;k<FRAME_SIZE;k++) input[k] = dataPtr[k]; //input is float[FRAME_SIZE] speex_bits_reset(&bits); speex_encode(enc_state, input, &bits); encByte = speex_bits_writ...
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_...
2008 Dec 05
0
Wine release 1.1.10
...ned3d: Make minMipLookup_noFilter and magLookup_noFilter const. wined3d: Const correctness fixes for surface_base.c. wined3d: Remove some superfluous casts. wined3d: Const correctness fixes for directx.c. wined3d: Fix the glWeightPointerARB prototype. wined3d: Make the lpData member of WineDirect3DStridedData const. wined3d: Const correctness fixes for drawprim.c. wined3d: Handle a few "silent" FIXMEs more consistent with the rest of the code. wined3d: Const correctness fixes for state.c. wined3d: Const correctness fixes. wined3d:...
2004 Oct 28
5
How to help improving Wine?
Hi, I really did my best to understand how I can help improving Wine, but I did not succed. Well, everything started when I installed a win application on my Debian 3.1, Wine 2004.07.16 deb (clean install, no dlls). The application is ALOHA (http://www.epa.gov/ceppo/cameo/aloha.htm) It's a free application from US-Environment Protection Agency used for chemical emergency planning (I am an