Jump to content
Tuts 4 You

How to pause/resume WAVE? (Win32 API)


alaphate

Recommended Posts

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.

Link to comment
TheAnalyzer

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

Link to comment

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...