Solved

Media Player

Posted on 2002-06-05
5
185 Views
Last Modified: 2010-04-04
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
Comment
Question by:alshepstone
5 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 7055874
Hello

  Use the PlaySound API to play the small wav files, and pause the media player while that
0
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 50 total points
ID: 7055876
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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7056026
too late :-(
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010460
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 221
Delphi selector screen 2 84
Unique identifier on a terminal server (rdp) 4 67
Multi-layered image in FireMonkey 9 48
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question