FromUri
Introduction
Code Example
string songFileName = @"content/SongName.mp3";
var uri = new Uri(songFileName, UriKind.Relative);
var song = Song.FromUri("SongName", uri);
// The song should be added to the ContentManager disposable list so that it is unloaded
// when the screen is unloaded:
FlatRedBallServices.AddDisposable(songFileName, song, this.ContentManagerName);
// Finally, the song can be played with the PlaySong method:
bool isGlobalContent = this.ContentManagerName == FlatRedBallServices.GlobalContentManager;
FlatRedBall.Audio.AudioManager.PlaySong(song, false, isGlobalContent);FlatRedBall Android
Last updated
Was this helpful?