PDA

View Full Version : dsound streaming in dll, notification problem...


radioman
06-06-2006, 02:49 PM
this is example what i do:

http://safariexamples.informit.com/0672325969/DirectX%20SDK/Samples/C%2B%2B/DirectSound/StreamData/streamdata.cpp

All is right while i do it in EXE module, but my engine is in DLL, therefore i put my own class in DLL, but after that sound streaming don't work for me
(something is happend with notification event, it's not notify all the time, case WAIT_OBJECT_0 + 0: never excute).

I just export my own engine class and use int in exe, all atoher work is doing in DLL.

What i should to do, that all will be good and working???????????

Reedbeta
06-06-2006, 05:30 PM
If you're using this from a DLL, WinMain won't be called, and so the notification thread would never get set up. You'll need to create the notification thread yourself as shown on lines 270-271 of that file, and possibly do other setup stuff (see the file).

juhnu
06-06-2006, 10:12 PM
You could do this without using the notification messages. Just update the buffer with a certain interval. The bigger buffer you use, the less updates you need, but that would of course increase the latency on the other hand.

radioman
06-07-2006, 10:48 AM
thanks, i try to do it without notification message, but it's be good to do with her... :huh: