Source language: Translate to:

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

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

Moderator: Neosoft Support

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

Postby JBoyd333 » Mon Mar 31, 2008 12:37 pm

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
JBoyd333
 
Posts: 2
Joined: Tue Sep 19, 2006 9:37 pm

Postby WinMacLyn » Mon Mar 31, 2008 6:26 pm

Does anyone know how to stop an .mp3 sound file some other way?

Try this command:
Code: Select all
MediaPlayerStop "MediaPlayer1"
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Wrangler » Tue Apr 01, 2008 7:47 am

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
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 2 guests

cron