Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Get defualt path of wave file

Posted on 2000-03-01
3
Medium Priority
?
182 Views
Last Modified: 2010-04-04
Hi,
I want defult path of wave file such like wave on error in windows beep.wav
and in other Pc or OS xx.wav i want the defult path to send it to SndPalySound(defult path,1)

Abdelghani
0
Comment
Question by:ghuna388
3 Comments
 

Expert Comment

by:kangxy
ID: 2572319
Why not use MessageBeep function :)
The MessageBeep function plays a waveform sound. The waveform sound for each sound type is identified by an entry in the [sounds] section of the registry.

BOOL MessageBeep(

    UINT uType       // sound type  
   );

Remarks

After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously.
If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the system default sound, the function produces a standard beep sound through the computer speaker.
The user can disable the warning beep by using the Control Panel Sound application.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2572788
Use Delphi's Beep procedure...
0
 
LVL 17

Accepted Solution

by:
inthe earned 80 total points
ID: 2573678
Hello
these sounds are already defined in mmsystem.pas so to use them just add mmsystem to uses section and use playsound functions:

  PlaySound(pChar('SYSTEMDEFAULT'),0,SND_SYNC);

PlaySound(pChar('SYSTEMSTART'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMEXIT'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMHAND'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMASTERISK'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMQUESTION'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMEXCLAMATION'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMWELCOME'),0,SND_SYNC);


Regards Barry
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

877 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