search for: pdscapturelockedbuffer

Displaying 2 results from an estimated 2 matches for "pdscapturelockedbuffer".

2005 Jun 23
2
Speex and DS
...ou have some code samples how to compress standard DS buffers: LPDIRECTSOUND8 lpDS = NULL; LPDIRECTSOUNDCAPTURE8 lpDSC = NULL; LPDIRECTSOUNDBUFFER8 lpBuf1 = NULL; LPDIRECTSOUNDCAPTUREBUFFER8 lpBufCap1 = NULL; copying memory and playing without compression works : CopyMemory( pDSOutputLockedBuffer, pDSCaptureLockedBuffer, dwDSOutputLockedBufferSize ); but anything related to Speex just makes jitter :[. Please respond, because I'm really stuck on this one :[. I've read the sample code in the manual but and even done a bridge binary file to write buffer to disc drive and to reread it like in the manual. I k...
2005 Jun 23
1
Speex and DS
...//CODE/////////// // These should be equal if( dwDSOutputLockedBufferSize != dwDSCaptureLockedBufferSize ) return E_FAIL; // Sanity check unhandled case int size = dwDSOutputLockedBufferSize; //size in bytes char* buffer = new char[size]; // buffer of bytes CopyMemory( buffer, //fill the buffer pDSCaptureLockedBuffer, dwDSOutputLockedBufferSize ); void* enc_state; //states void* dec_state; #define FRAME_SIZE 160 //frame size in shorts, #define BUFFERSIZE 4*FRAME_SIZE*sizeof(short) #define SS sizeof(short) short in[FRAME_SIZE]; float input[FRAME_SIZE]; int nbBytesenc; int nbBytesdec; SpeexBits bitsenc; //bi...