Jump to content
Tuts 4 You

How to pause/resume WAVE? (Win32 API)


alaphate

Recommended Posts

Posted
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch(message) {
case WM_CREATE:
sndPlaySound("hello.wav", SND_FILENAME | SND_ASYNC);
return 0;
}

I know how to stop it by sndPlaySound("", SND_FILENAME | SND_ASYNC);

//sending NULL string

but how to pause and resume it?

Thanks a lot for helping me.

TheAnalyzer
Posted

Hello alaphate,

U can use this function to pause the play:

MMRESULT waveOutPause(

HWAVEOUT hwo

);

Parameters

hwo

Handle to the waveform-audio output device.

And this one to resume:

MMRESULT waveOutRestart(

HWAVEOUT hwo

);

Parameters

hwo

Handle to the waveform-audio output device.

I Hope that u can resolve this pbl now.

Greetz

Posted

TheAnalyzer, I appreciate your help.

I'll try to figure out how to use them :)

Thx a lot.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...