[Speex-dev] Speex and DS
rafal at dial.net.pl
Thu Jun 23 01:58:51 PDT 2005
I've a following problem with the speex codec. I'm developing application
that is supposed to read
sounds from the microphone with DirectSoundCapture. Unfortunately when I
want to compress and decompress
the sound buffer from DirectSound I only have jitter. Maybe you 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 :
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 know the DSound buffers are *void but its a sequence of bytes that should
be possible to compress.
I use standard 8Khz,16 bit, 1 channel recording.
#define FRAME_SIZE 160
int size = dwDSOutputLockedBufferSize;
char* buffer = new char[size];
CopyMemory( //copying the buffer to an array of bytes
/*Read a 16 bits/sample audio frame*/
Thank you for any help
More information about the Speex-dev