This example shows how you can create and play an audio sample. Creating a player is simple:
Like a movie, you have to specify the file extension of an audio player.
You need to create an audio player property outside the scope of a method. If you don’t the app won’t keep the player in memory and it will disappear without ever playing.