Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectSound

Started by grinder Oct 8, 1999 at 1:13 AM 6 replies 1.4k views
Original Post
grinder
grinder
I'm currently working on an interactive storybook. I have a voice reading the text and when the wav file end I want the page to flip.
I have the voice in 6 different languages so i cant make a timer that flips the page. I have to have the program tell the flipfunction when to start.

I know this is possible in DirectX but I can't figure out how to.

I'm using DX6.1 and VC++ 6.0

Cheers
_grinder_

------------------

Jim Adams
Jim Adams
DirectSound notifications, when correctly setup, WILL notify you when a sound is finished playing. That's one of the reasons for them. It will work with static and streaming buffers, and very easily at that. Here's how:

1)Setup your notification interface.

2)If the sound is static, then it fits into one buffer. Setup the ONLY notification position as DSBPN_OFFSETSTOP, and only one event being triggered. If the sound is streamed, setup 3 positions, one midstream, one endstream, and the last that marks where the end of the sound would be.

3) In the notification routine, just keep track of which notification position has been triggered. If the sound is static, there's only one notification - sound stopped/completed.


I have a half-finished article I was writing on using DirectX and notifications that I can finish up if anybody shows some interest in it. It talks about all the above.

------------------
Jim Adams
Co-Designer 'The Light Befallen'
tcm@pobox.com
http://www.lightbefallen.com

Sphet
Sphet
Actually Direct Sound does have this capability. Read up on:

IDirectSoundNotify::SetNotificationPositions()

Works like a hot-damn.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.