Archived

This topic is now archived and is closed to further replies.

loco3d

LPDIRECTSOUNDBUFFER & IDIRECTSOUNDNOTIFY not working

Recommended Posts

Hey guys, Got a real quick question that I hope somebody can answer fairly quickly. I''m writing a sound system for a game and this system maintains a playlist of buffers to play and what not. Once a slot is filled and the wav data is copied to the buffer, I want to set the notification event to let me know when it''s stopped playing. Seems very simple, but for some reason, when I call QueryInterface on my LPDIRECTSOUNDBUFFER object to get a handle to a valid LPDIRECTSOUNDNOTIFY object, it fails. Why? Any help would be greatly appreciated, LoCo3D

Share this post


Link to post
Share on other sites
Ok, back from lunch. After checking the HRESULT returned from QueryInterface, I''m receiving this error:

E_NOINTERFACE No such interface supported 0x80004002

Any ideas? Maybe I''m creating my buffer incorrectly, however, the sounds play fine.

Thanks,

LoCo3D

Share this post


Link to post
Share on other sites
I had the exact same error when setting up a dsound capture

I was using the wrong interface on the query; I forget if you need to use the buffer or the main DS or a DSdesc, but it worked once I used the correct interface to query from.

Double check the sdk & your code.

Share this post


Link to post
Share on other sites