A Andrew Gray Member Licensed User Longtime User Feb 6, 2016 #1 I'm trying to have an app play sound files that are stored in a subfolder of my project's Files folder (there are a lot of small assets associated with my project and having them all together in the root of the Files folder would make them hard to manage). However, when I try code such as the following, the file is not recognised. (Things work fine when the sound is in the root of the folder.) Code: Copy Dim mp as MediaPlayer mp.Initialize mp.Load(File.DirAssets, "mysubfolder\myfile.mp3") mp.Play Does MediaPlayer simply not work with files that are in subfolders? And if not, what am I doing wrong? Any help greatly appreciated. Andrew
I'm trying to have an app play sound files that are stored in a subfolder of my project's Files folder (there are a lot of small assets associated with my project and having them all together in the root of the Files folder would make them hard to manage). However, when I try code such as the following, the file is not recognised. (Things work fine when the sound is in the root of the folder.) Code: Copy Dim mp as MediaPlayer mp.Initialize mp.Load(File.DirAssets, "mysubfolder\myfile.mp3") mp.Play Does MediaPlayer simply not work with files that are in subfolders? And if not, what am I doing wrong? Any help greatly appreciated. Andrew
Cableguy Expert Licensed User Longtime User Feb 6, 2016 #2 have you tried adding a leading slash to the file name, like "\mysubfolder\myfile.mp3" ? Upvote 0
HotShoe Well-Known Member Licensed User Longtime User Feb 6, 2016 #3 Linux/Android uses forward slashes"/" windows uses backslashes "\" Upvote 0
A Andrew Gray Member Licensed User Longtime User Feb 6, 2016 #4 With forward slashes it works. Many thanks! Upvote 0