[speex-dev] C++ wrapper for speex

Ronald Madrid mfcguru at yahoo.com
Tue May 25 05:20:07 PDT 2004



hi sirs,

i am only recently studying speex and i'm looking for
a C++ wrapper for speex that has higer-level
implementations for the Encode and Decode functions,
to sort of base my initial understaning of how the
speex API work.

i have in fact created my own, following on the
instructions in the speex codec manual, but i havn't
really made any positive progress. (a lot of people
have already 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);
                                        
                pSpeexHdr->lpData = (char*)pSound; 
                pSpeexHdr->dwBufferLength = lpHdr->dwBufferLength; 
                pSpeexHdr->dwFlags = 0L; 
                pSpeexHdr->dwLoops = 0L;
                
                m_Player->PostThreadMessage(WM_PLAYSOUND_PLAYBLOCK,
GetCurrentThreadId(),(LPARAM) lpHdr);					
        }
}

this handler would simply capture the voice data and
immidiately play it as it is, and as far as that is
concern, it is working.

my speex case study is simple. i just want to encode
the raw data recieved by the handler and immidiately
decode it before posting WM_PLAYSOUND_PLAYBLOCK, and
to supply the decoded data as appropriate.

i would sincerely appreciate any offer of help,
advices, some real source code, or whatever graces
that would help me advance away from this ignorance. 

thank you to all of you and for the wonderful codec
that is speex.

ronald c. madrid

<p>        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list