Click here to Skip to main content
12,952,603 members (36,074 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi all,

I am writing a program to play a wav file in C++ using mmsystem library(mmsystem.h),

I can play, stop and pause but I can not when end play wav file.

Please help em to resolve this.

Thanh you very much!
Posted 15-May-12 22:02pm
ngthtra1.4K

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Depends on the callback mechanism you have adopted in waveOutOpen() API.

1) If you choose to have a window or thread receive callback information, the following messages are sent to the window procedure function to indicate the progress of waveform-audio output: MM_WOM_OPEN, MM_WOM_CLOSE, and MM_WOM_DONE.
MM_WOM_DONE indicates the end of playback.

2) If you choose to have a function receive callback information, the following messages are sent to the function to indicate the progress of waveform-audio output: WOM_OPEN, WOM_CLOSE, and WOM_DONE.
WOM_DONE also indicates the end of playback.

References:
- WOM_DONE[^]
- MM_WOM_OPEN[^]
- MM_WOM_CLOSE[^]
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,289
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,900


Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100