How to play mp3 file?
-
- Enthusiast
- Posts: 339
- Joined: Tue Jan 30, 2007 5:47 am
- Location: Hong Kong
How to play mp3 file?
Any library or example?
Re: How to play mp3 file?
Hi SkyManager,
A simple solution (depending on your requirements) is using the WebGadget: HTML Audio
- see the following for similar working examples
-- MP4 Player
-- YouTube Player
A simple solution (depending on your requirements) is using the WebGadget: HTML Audio
- see the following for similar working examples
-- MP4 Player
-- YouTube Player
Re: How to play mp3 file?
Another solution : FModex (Unicode) PB 5.60 (x86 & x64)
https://github.com/pbcodex/FMODEX-MIN-UNICODE
Try Fmod Ex - Play Sound.pb
https://github.com/pbcodex/FMODEX-MIN-UNICODE
Try Fmod Ex - Play Sound.pb
➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti
Sorry for my bad english and the Dunning–Kruger effect.
Re: How to play mp3 file?
Simple and straightforward
Code: Select all
If InitMovie() = 0
MessageRequester("Error", "Can't initialize movie playback !", 0)
End
EndIf
MovieName$ = OpenFileRequester("Choose the movie to play", "", "All Files|*.*", 0)
If MovieName$
If LoadMovie(0, MovieName$)
OpenWindow(0, 100, 150, MovieWidth(0), MovieHeight(0), "PureBasic - Movie")
PlayMovie(0, WindowID(0))
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIf
Egypt my love
Re: How to play mp3 file?
Tiny solution (on Windows):
Code: Select all
sfile.s = "C:\song.mp3"
mciSendString_("open " + sFile + " alias 1", 0, 0, 0)
mciSendString_("play 1 wait", 0, 0, 0);
Re: How to play mp3 file?
Thats what I was looking forfirace wrote:Tiny solution (on Windows):
Code: Select all
sfile.s = "C:\song.mp3" mciSendString_("open " + sFile + " alias 1", 0, 0, 0) mciSendString_("play 1 wait", 0, 0, 0);