Playing audio from file in .NET app

Hi, I’m trying to make a sound play from a .mp3 file saved in the res/ directory of my .NET app. I have it as an embedded resource in the build action of the file. I’m able to successfully initialize the Player object, but it’s giving me a FileNotFoundException when trying to play it.

So far, this is the relevant code:
using Tizen.Multimedia;

Player soundPlayer = new Player();
soundPlayer.SetSource(new MediaUriSource(“tick.mp3”));
await soundPlayer.PrepareAsync();
soundPlayer.Start();

I guess my real question is, how do I know where the media file is located since it’s bundled with the app? Any help will be greatly appreciated.

Thanks,
Kollin

Hi,
You will find an article in the following link. It implements the Tizen.Multimedia.Player library. You will also find a sample project with source code here.

Hope this will help you to resolve your problem.

Please let me know if it works for you.