Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / AGKStudio playing MP3 files

Author
Message
HST
14
Years of Service
User Offline
Joined: 7th Mar 2008
Location:
Posted: 18th May 2022 14:08
Hello,
Is it possible to play mp3 files in AGKStudio.?
I tried several things, but no sound is playing, here is my code:

SetVirtualResolution(800, 501)

image = LoadImage("test.jpg")
sprite = CreateSprite(image)
LoadMusic(1, "TechnoTronic.mp3")
PlayMusic(1, 1)

do
sync()
loop
HST
14
Years of Service
User Offline
Joined: 7th Mar 2008
Location:
Posted: 18th May 2022 15:11
The "problem" is solved!
Was a corrupt mp3 file.
Qube_
7
Years of Service
User Offline
Joined: 21st Oct 2014
Location: Omnipresent
Posted: 18th May 2022 19:02
AGK has better support for OGG files which are also smaller in size than MP3.
Zappo
Valued Member
17
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 19th May 2022 01:16
The OGG format (Ogg Vorbis) is also license free and open-source whereas MP3 has some restrictions. I use the OGG format for all my game music now as its compression is more efficient too.
HST
14
Years of Service
User Offline
Joined: 7th Mar 2008
Location:
Posted: 19th May 2022 12:53
Thanks for reply. Shall have a look at those ogg files.

Login to post a reply

Server time is: 2022-08-09 08:19:05
Your offset time is: 2022-08-09 08:19:05