Jumpvalley 0.5.0
An app and library that can be used to test and run 3D platformer levels. Currently being made with Godot.
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Jumpvalley.Music.Song Class Reference

Represents a single song associated with a file, along with some metadata. More...

Inheritance diagram for Jumpvalley.Music.Song:

Public Member Functions

 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.
 

Properties

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.
 

Detailed Description

Represents a single song associated with a file, along with some metadata.

Constructor & Destructor Documentation

◆ Song()

Jumpvalley.Music.Song.Song ( string filePath,
SongInfo info )
inline

Constructs a new Song instance.

Parameters
filePathThe absolute file path to the audio file
infoInfo about the song

Member Function Documentation

◆ GetAttributionString()

string Jumpvalley.Music.Song.GetAttributionString ( )
inline

Constructs an attribution string in the following format:
[song artist(s)] - [song name].

Returns
The attribution string

◆ OpenStream()

void Jumpvalley.Music.Song.OpenStream ( )
inline

Attempts to open up an AudioStream for the audio file located at Info.AudioPath

Exceptions
FileNotFoundExceptionThrown when the file at the given file path couldn't be found or when the file path is invalid.
InvalidDataExceptionThrown 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: