Play Sounds

yooooooshi

New Member
Hi!
I tried to play a Sound with

Sound(AppPath & "\sounds\sound.wav")

This worked on my Pc, but when I tryed the same on my HD2 with Windows Mobile 6.5, i couldn't hear a sound.

Can anybody help me?
 

specci48

Well-Known Member
Licensed User
Longtime User
There should be no problem with that line of code.
Maybe a typo in the foldername or the name of the .wav file on the device?
Are the .wav files conected to the media player on the device?


specci48
 

yooooooshi

New Member
Hi,
no, they are not connected to the media player.
Thanks a lot for your answer! I'll try to connect them to the media player.
 

ExcludeReality

Active Member
Licensed User
Hi,
no, they are not connected to the media player.
Thanks a lot for your answer! I'll try to connect them to the media player.

That should'nt make any difference. You probably just spelled the file path wrong, or the file is corrupt. Either way you should still hear a "beep" noise. If nothing works you can launch WMP with the file path as a parameter
 

specci48

Well-Known Member
Licensed User
Longtime User
That should'nt make any difference.
It should because that's what the connection of file extensions is used for.

Either way you should still hear a "beep" noise.
If you use a wrong path or filename no beep is played on the device.

If nothing works you can launch WMP with the file path as a parameter
That's one solution but I think it is better to use the file connection so the individual preferred sound player is opened instead of a special application.


specci48
 

agraham

Expert
Licensed User
Longtime User
It should because that's what the connection of file extensions is used for.
Sorry Specci but he's correct on that one. The "Sound" keyword calls the Windows API "PlaySound" function on both desktop and device and that has nothing to do with file associations as they only map a file type to a default application. In this case no application is concerned in playing the file, the OS does it itself.

You are however correct in that the device seems to have no default sound, that only seems to be implemented on the desktop.

One all! :sign0089:
 

nick2210

Member
sound

Hello.
I have tried it both on desktop and device.The sound plays well.

Sound("ph4.wav")

Neither "apppath" keyword no backslash.
 
Top