I'm trying to make an app in app desginer and I want to play an audio file in the background the whole time while my app is up and running. I currently have this:
[filename,filepath] = uigetfile('*.mp3','Select a File to Open');
fullname = [filepath, filename];
[a,f] = audioread(filename)
p = audioplayer(a,f)
But this allows me to only play the audio file once. I don't want to use a while loop as it will just stay stuck there and I want the app to do other stuff while the audio is playing in the background until for example I click on end button for music or close the app. Is there a way I can do that?
Thanks in advance!