Board index » cppbuilder » CALLBACK_THREAD
Isaac
![]() CBuilder Developer |
CALLBACK_THREAD2008-05-27 09:57:34 PM cppbuilder40 Hi, I'm experimenting with digital audio (hobby of mine). I can play/record with code made for a single executable application using CALLBACK_WINDOW and message maps. Absolutely no problems there. I'd like to write up a self-contained separate thread for playback (and another one for record) -- no calling of other threads etc -- everything in the one playback/record thread, however, I can't seem to make the following code work. In the implementation file I have: waveOutOpen(&WaveHandle, WAVE_MAPPER, &WaveFormat, (double)ThreadID, (double)this, CALLBACK_THREAD) ....... and the following in the header file: BEGIN_MESSAGE_MAP MESSAGE_HANDLER(MM_WOM_DONE, TMessage, OnWaveMessage) END_MESSAGE_MAP(TThread) Also tried the following with no joy. BEGIN_MESSAGE_MAP MESSAGE_HANDLER(WOM_DONE, TMessage, OnWaveMessage) END_MESSAGE_MAP(LineOut) It plays (or records) OK, but it's like messages aren't being handled. OnWaveMessage doesn't get called at all. What am I missing? Thanks in advance for any assistance. Isaac |