PlayMusic() .ogg file location

Monkey Forums/Monkey Beginners/PlayMusic() .ogg file location

blueFire(Posted 2015) [#1]
When I use PlayMusic() I have discovered that I can play .ogg files if the .ogg file is located in the "project".data folder but when I try to play them from another location (such as C:\Users\UserName\Music\test2.ogg) the file does not play. There is nothing but silence. I am using the glfw2 target.

Jason


StoneFaceEXE(Posted 2015) [#2]
As long as I remember you cannot use files that are not in your project folder.

PS: I tried to load an image from C:/folder and it didn't work


Pharmhaus(Posted 2015) [#3]
You need to reverse the slashes like
C:/folder/...
or use
PlayMusic("C:\folder\music.ogg".Replace("\\","/"))

Otherwise it always adds the path of the data folder in front of it.


blueFire(Posted 2015) [#4]
You are correct. I changed every "\" to "/" and it works now. Thank you.

Jason