StopMedia "Sound" doesn't work for an .mp3 file

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Locked
JBoyd333
Posts: 2
Joined: Tue Sep 19, 2006 9:37 pm

StopMedia "Sound" doesn't work for an .mp3 file

Post by JBoyd333 »

I am using the command:

PlaySoundFile "[PubDir]\[Sound_File].wav" "Normal"

to play a .wav file, and the command:

StopMedia "Sound"

to stop playing it (this is supposed to stop all currently playing media files).

However, when I play an .mp3 file, using:

PlaySoundFile "[PubDir]\[Sound_File].mp3" "Normal"

it won't respond to the StopMedia "Sound" command, but plays all the way to the end without stopping.

I can stop the .mp3 file by giving it the name of the file:

StopMedia "[PubDir]\[Sound_File].mp3"

command, but I'd rather use the generic "Sound" command if possible so I don't have to keep track of all the file names that are playing.

Does anyone know how to stop an .mp3 sound file some other way? I would really like to use the smaller .mp3 files instead of the .wav ones to save space!

thanks,

John
User avatar
WinMacLyn
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Post by WinMacLyn »

Does anyone know how to stop an .mp3 sound file some other way?
Try this command:

Code: Select all

MediaPlayerStop "MediaPlayer1"
User avatar
Wrangler
Posts: 1531
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA
Contact:

Post by Wrangler »

StopMedia ""

to stop All media, as explained in the action box.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
Locked