Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
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.3K

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
0 OriginalGriff 318
1 Richard Deeming 180
2 Sergey Alexandrovich Kryukov 175
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,218
1 OriginalGriff 5,413
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2014
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