Are you sure the file exists? Lets get that out of the way first.
Edit: and if it does exists please zip up your project, upload it somewhere, and PM me the link so I can debug this for ya.
I am also having this issue. I have tried converting to .ogg, and having both m4a files and ogg files in the folder, everything plays fine in the editor, and during play test.
Simply when using XDK and simulating using the Galaxy Tab 2 7.0, I get Failed to load audio/bgm/Theme2.m4a. I have tried changing the theme via database/system and changing the loading theme to a different theme, but then it just changes file names.
I have a partial fix to this, I just removed BGM's from every map, and had to removed Battle1 and Victory1 and other bgm's from the database/system in order to get it to work.
Exported apk file and put on my galaxy and runs no problems, even SE's play, seems to be just related to BGM's. I have tried just ogg files, just m4a files, and having both included.
Any ideas?
Thanks.
I was also having an issue with it not seeing my title screen BGM. I changed it to other things but no matter what it didn't work. I removed the music completely from title until I can find a fix here. Only that 1 BGM is having the issue. Everything else works great.
In a lot of cases (and I haven't seen that mentioned here), this is caused by filenames or file-path that do not conform to networking rules, but where Windows overrides the difference. That override would make the wrong file available under Windows, but on Android (or generally all other operating systems) this specific Windows-Override does not exist and the engine fails to find the file.
To be more precise, there are two different overrides.
1) Town8.m4a is a different file than town8.m4a
Windows overrides capitalisation on filenames. If a program looks for Town8.m4a and doesn't find it, but a file town8.m4a exists, then Windows redirects to that. On any other OS that usually results in a "file not found".
2) In networking path-names, spaces and non-latin letters are forbidden.
Again, if your project path contains spaces (or a username of non-latin letters) then Windows redirects it to the correct equivalent, but that redirect does not exist on most other OS.