Represents a single song associated with a file, along with some metadata.
More...
|
| | Song (string filePath, SongInfo info) |
| | Constructs a new Song instance.
|
| void | OpenStream () |
| | Attempts to open up an AudioStream for the audio file located at Info.AudioPath
|
|
void | CloseStream () |
| | Closes the AudioStream associated with this Song instance.
|
| string | GetAttributionString () |
| | Constructs an attribution string in the following format:
[song artist(s)] - [song name].
|
|
void | Dispose () |
| | Disposes of this Song instance.
|
|
|
string | FilePath [get] |
| | The absolute file path to the audio file.
|
|
SongInfo | Info [get] |
| | Info about the song.
|
|
AudioStream | Stream [get] |
| | The actual audio stream that contains the sound data for playback by an AudioStreamPlayer
|
|
bool | IsLooping [get, set] |
| | Whether or not the song is looping.
|
Represents a single song associated with a file, along with some metadata.
◆ Song()
| UTheCat.Jumpvalley.Core.Music.Song.Song |
( |
string | filePath, |
|
|
SongInfo | info ) |
|
inline |
Constructs a new Song instance.
- Parameters
-
| filePath | The absolute file path to the audio file |
| info | Info about the song |
◆ GetAttributionString()
| string UTheCat.Jumpvalley.Core.Music.Song.GetAttributionString |
( |
| ) |
|
|
inline |
Constructs an attribution string in the following format:
[song artist(s)] - [song name].
- Returns
- The attribution string
◆ OpenStream()
| void UTheCat.Jumpvalley.Core.Music.Song.OpenStream |
( |
| ) |
|
|
inline |
Attempts to open up an AudioStream for the audio file located at Info.AudioPath
- Exceptions
-
| FileNotFoundException | Thrown when the file at the given file path couldn't be found or when the file path is invalid. |
| InvalidDataException | Thrown when the file was found, but the data format of the file is invalid. |
The documentation for this class was generated from the following file: