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 Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | Events | List of all members
Jumpvalley.Music.Playlist Class Reference

Represents a musical playlist that can hold multiple Songs. More...

Inheritance diagram for Jumpvalley.Music.Playlist:
Jumpvalley.Music.MusicGroup Jumpvalley.Music.MusicZone

Public Types

enum  SongStreamHandlingModeFlags { Disabled = 0 , AddAndRemove = 1 }
 Enumerator that specifies how a Playlist should approach opening and closing the audio streams of its Song instances. More...
 

Public Member Functions

void Add (Song s)
 Adds a song to the playlist.
 
void Remove (Song s)
 Removes a song from the playlist.

If the song that gets removed is being played, the playlist will move onto the next song if there are still songs in the playlist after removal, or the playlist will stop immediately.
 
void Play ()
 This method plays the first song in the playlist (the song in index 0) if no song in the playlist is currently being played. Otherwise, the playback of the current song is resumed and the linear volume of this playlist transitions back to (LinearVolume * LocalVolumeScale).
 
void StopImmediately ()
 Stops the playback of the playlist immediately, skipping the fade out transition that gradually makes the playlist inaudible.
 
void Stop ()
 This method gradually transitions the playlist's volume to be inaudible, and then stops the playlist once that transition is done.
 
new void Dispose ()
 Stops and disposes of this Playlist.
 

Static Public Member Functions

static float VolPercentToDecibels (float percent)
 Converts a volume percentage in the range of [0, 1] to the corresponding value in decibels and returns the result.
 

Public Attributes

double TransitionTime = 0
 The number of seconds that the volume transitioning lasts when uninterrupted.
 
SongStreamHandlingModeFlags SongStreamHandlingMode
 How the playlist is currently opening and closing audio streams of its songs.
 

Protected Member Functions

void HandleTweenFinish (object _o, EventArgs _e)
 
void OnSongChanged (SongChangedArgs args)
 
void RaiseStoppedEvent ()
 

Protected Attributes

List< SongSongList = new List<Song>()
 The list of Songs being played by this playlist.
 

Properties

static float NonAudibleVolume = Mathf.DbToLinear(-80f) [get]
 Lowest audio volume (in the linear form) that Godot's editor will let you set the volume of a sound to.
Such volume shouldn't be audible to humans.
 
double LocalVolumeScale [get, set]
 Multiplier for linear volume that's typically in the range of [0, 1]
Can be used to mute or unmute the playlist without affecting the original value of LinearVolume
 
double LinearVolume [get, set]
 Volume of the playlist's music in a linear fashion.
 
Song CurrentSong [get]
 The song that's currently being played in this playlist.
 

Events

EventHandler< SongChangedArgsSongChanged
 Called when the currently playing song changes.
 
EventHandler Stopped
 Called when the playlist stops the playback of its music. If a fade transition is applied to fade out the currently playing song, this event will get called after the transition has completed.
 

Detailed Description

Represents a musical playlist that can hold multiple Songs.

Member Enumeration Documentation

◆ SongStreamHandlingModeFlags

Enumerator that specifies how a Playlist should approach opening and closing the audio streams of its Song instances.

Enumerator
Disabled 

Specifies that the Playlist shouldn't open or close the audio streams of Song instances it handles.

AddAndRemove 

Specifies that the Playlist should open a song's audio stream when it's added to the playlist, and close a song's audio stream when it's removed from the playlist.

Member Function Documentation

◆ Add()

void Jumpvalley.Music.Playlist.Add ( Song s)
inline

Adds a song to the playlist.

Parameters
sThe song to add

◆ Remove()

void Jumpvalley.Music.Playlist.Remove ( Song s)
inline

Removes a song from the playlist.

If the song that gets removed is being played, the playlist will move onto the next song if there are still songs in the playlist after removal, or the playlist will stop immediately.

Parameters
sThe song to remove

◆ VolPercentToDecibels()

static float Jumpvalley.Music.Playlist.VolPercentToDecibels ( float percent)
inlinestatic

Converts a volume percentage in the range of [0, 1] to the corresponding value in decibels and returns the result.

Returns

The documentation for this class was generated from the following file: