I m using .net Maui and attempting to create audioManager players for a couple of sound files located in the ResourcesSounds folder in the project.
The code is this:
var playerStartSound = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync("record-start.mp3"));
When it runs, I get an error:
System.IO.FileNotFoundException: Could not find file /private/var/containers/Bundle/Application/3C75FEDB-E70F-43F9-8F37-9AC51D76BB62/MyApp.app/record-start.mp3 .
I m not sure if the ResourcesSounds should be added to the above path or if the OpenAppPackageFileAsync will search the subfolder s or not?
What am I doing wrong here? How can I access the files located in the MyAppResourcesSounds folder?