• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Media Player

I have developed a program which when running plays a large wav file using the media player. It also uses small wav files for audio warnings. When the small wav files are called it stops the main wav file and plays the warning after which it restarts the main wav file from the beginning.. How can I get the main file to pause while playing the warning file and then resume from where it left off rather than start at the beginning.
0
alshepstone
Asked:
alshepstone
1 Solution
 
Mohammed NasmanSoftware DeveloperCommented:
Hello

  Use the PlaySound API to play the small wav files, and pause the media player while that
0
 
Lee_NoverCommented:
have to players :)
one for the big wavfile and one for the warnings

then in the warning procedure like:

procedure TForm1.SoundWarning(WarningType: Integer);
begin
  MediaPlayer1.Pause;
  // handle warning type and set the mediaplayer file
  MediaPlayer2.Play;
  MediaPlayer1.Unpause;
end;


dunno the mediaplayer methods :)
I use fmod for audio www.fmod.org :)
0
 
kretzschmarCommented:
too late :-(
0
 
pnh73Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from Lee_Nover

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now