Article View: borland.public.cppbuilder.multimedia
Article #198CALLBACK_THREAD
From: Isaac
Date: Tue, 27 May 2008 13:57
Date: Tue, 27 May 2008 13:57
46 lines
2002 bytes
2002 bytes
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
Technical Details
Message-ID:
<483c134e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,c44ef3876ed33b54,start X-Google-Attributes: gid10d0fc,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Isaac" <f4ier@hotmail.com> Sender: "Isaac" <f4ier@hotmail.com> Reply-To: "Isaac" <f4ier@hotmail.com> Subject: CALLBACK_THREAD Newsgroups: borland.public.cppbuilder.multimedia X-User-Info: 121.44.2.5 NNTP-Posting-Host: 207.105.83.66 Message-ID: <483c134e$1@newsgroups.borland.com> Date: 27 May 2008 06:57:34 -0700 X-Trace: newsgroups.borland.com 1211896654 207.105.83.66 (27 May 2008 06:57:34 -0700) Lines: 46 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1836