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 Classic Chat / [SOLVED] Can't seem to play mp3 files...

Author
Message
JoeOh45240
7
Years of Service
User Offline
Joined: 14th Feb 2017
Location: USA
Posted: 15th Aug 2021 17:55
I used audacity to convert the mp3 file I have to 128kbps stereo. I've tried regular stereo and joint stereo. I can seem to load the mp3 just fine but when I try to play the file it gives me the "Failed to load music source filter, is the filename correct?" error. Yes they filename is correct and in the right folder. I searched the forums for help before posting this. what are the usual culprits when dealing with this? Thanks
CODE HARD STUDIOS YOUTUBE CHANNEL: [link]https://www.youtube.com/channel/UCT6j3UphfDRcpJ0S444rnFA[/link]

The author of this post has marked a post as an answer.

Go to answer

Loktofeit
AGK Developer
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 15th Aug 2021 21:27
Without seeing your code, here are a few suggestions right off the bat:

Check that you are looking in the correct directory
Check that your paths and filenames are spelled correctly
If on any platform other than Windows, keep in mind case-sensitivity. song.mp3 and Song.MP3 are the same in Windows, but they are different filenames in most other operating systems.

LynxJSA's web games/quizzes - LynxJSA's Android apps
AGK Resource Directory
"Stick to a single main loop (DO...LOOP) and loop through it every frame.
Do everything inside functions.
Use finite state machines to control your game.
Use lots and lots of source files.
JoeOh45240
7
Years of Service
User Offline
Joined: 14th Feb 2017
Location: USA
Posted: 15th Aug 2021 21:45
I have the mp3 track in the same folder as my wav sound effects. All wave sound effects load and play just fine so it's not a file location issue. The filename is verified to be spelled the same as well, even with all letters being lower-case. What else can it be?

I am using the commands like this:

Loadmusic(1, "track1.mp3")

PlayMusic(1,1)
CODE HARD STUDIOS YOUTUBE CHANNEL: [link]https://www.youtube.com/channel/UCT6j3UphfDRcpJ0S444rnFA[/link]
Loktofeit
AGK Developer
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 15th Aug 2021 22:02
What OS are you working in? Is it Linux? Is it MeeGo?
Are you playing in the player, or trying to build an EXE or APK?
LynxJSA's web games/quizzes - LynxJSA's Android apps
AGK Resource Directory
"Stick to a single main loop (DO...LOOP) and loop through it every frame.
Do everything inside functions.
Use finite state machines to control your game.
Use lots and lots of source files.
Bored of the Rings
User Banned
Posted: 15th Aug 2021 22:04
encoding? licence? up-to-date with AGK2 version?

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
JoeOh45240
7
Years of Service
User Offline
Joined: 14th Feb 2017
Location: USA
Posted: 15th Aug 2021 22:16 Edited at: 15th Aug 2021 22:18
I'm using windows 10, building an .exe, encoding is what I stated before....128kbps @ 44100hz

edit: I'm using the freeware AppGameKit platform...I do plan to buy the full one when I can
CODE HARD STUDIOS YOUTUBE CHANNEL: [link]https://www.youtube.com/channel/UCT6j3UphfDRcpJ0S444rnFA[/link]
jd_zoo
6
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 17th Aug 2021 00:26
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 17th Aug 2021 01:17 Edited at: 17th Aug 2021 01:24
Quote: " PlayMusic(1,1)
...
I'm using the freeware AppGameKit platform"

how old is it? which version?
does it play fine without the loop flag?
see: https://forum.thegamecreators.com/thread/209719#msg2506388
found via google site search (which comes in pretty handy).

otherwise, i've always used audacity and played mp3 exports without issue.
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
JoeOh45240
7
Years of Service
User Offline
Joined: 14th Feb 2017
Location: USA
Posted: 17th Aug 2021 19:20
I tried removing the loop part of the argument, still no dice....Guess I'm just going to have to convert the music track to a .wav file and play it that way....too bad I can't use compressed wav files-
CODE HARD STUDIOS YOUTUBE CHANNEL: [video] channel/UCT6j3UphfDRcpJ0S444rnFA[/video]
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Aug 2021 00:02 Edited at: 18th Aug 2021 00:03
This post has been marked by the post author as the answer.
Convert it to Ogg Vorbis instead. They are compressed and fully compatible.
JoeOh45240
7
Years of Service
User Offline
Joined: 14th Feb 2017
Location: USA
Posted: 18th Aug 2021 07:17
At least ogg works as well as being compressed to something reasonable...thanks!
CODE HARD STUDIOS YOUTUBE CHANNEL: [video] channel/UCT6j3UphfDRcpJ0S444rnFA[/video]

Login to post a reply

Server time is: 2024-11-24 04:12:57
Your offset time is: 2024-11-24 04:12:57