Class for managing streamed music using an sf::Music object.
More...
#include <VMusic.h>
Class for managing streamed music using an sf::Music object.
◆ Attenuation()
float VMusic::Attenuation |
( |
| ) |
|
- Returns
- Attenuation rate of music (how much the volume changes based on distance in 3D space).
◆ ChannelCount()
unsigned int VMusic::ChannelCount |
( |
| ) |
|
- Returns
- Amount of audio channels.
◆ Duration()
sf::Time VMusic::Duration |
( |
| ) |
|
- Returns
- Total music length as an sf::Time object.
◆ Fade()
void VMusic::Fade |
( |
bool |
fadeIn, |
|
|
float |
fadeLength, |
|
|
float |
maxVolume = 100.0f , |
|
|
float |
minVolume = 0.0f |
|
) |
| |
Fade current music by volume.
- Parameters
-
fadeIn | If true, the volume will fade in. |
fadeLength | Length of time for the fade to process. |
maxVolume | The highest volume for fade (Initial volume for Fade Out). |
minVolume | The lowest volume for fade (Initial volume for Fade In). |
◆ Loop()
- Returns
- If current music should loop.
◆ MinDistance()
float VMusic::MinDistance |
( |
| ) |
|
- Returns
- Minimum distance before attenuation takes effect.
◆ OpenMusicFile()
VMusic* VMusic::OpenMusicFile |
( |
const sf::String & |
filename | ) |
|
Opens music data from file. Various properties will only have an effect once music data is open.
◆ OpenMusicMemory()
VMusic* VMusic::OpenMusicMemory |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Opens music data from memory. Various properties will only have an effect once music data is open.
◆ OpenMusicStream()
VMusic* VMusic::OpenMusicStream |
( |
sf::InputStream & |
stream | ) |
|
Opens music data from a stream. Various properties will only have an effect once music data is open.
◆ Pitch()
- Returns
- Pitch of audio (and tempo).
◆ PlayOffset()
float VMusic::PlayOffset |
( |
| ) |
|
- Returns
- Current playing position of music.
◆ Position()
sf::Vector3f VMusic::Position |
( |
| ) |
|
- Returns
- Position of music being played in 3D space.
◆ RelativeToListener()
bool VMusic::RelativeToListener |
( |
| ) |
|
- Returns
- Is music position relative to listener.
◆ SampleRate()
unsigned int VMusic::SampleRate |
( |
| ) |
|
- Returns
- Sample Rate (i.e. 44100Hz).
◆ SetAttenuation()
void VMusic::SetAttenuation |
( |
float |
attenuation | ) |
|
- Parameters
-
attenuation | Attenuation rate of music (how much the volume changes based on distance in 3D space). |
◆ SetLoop()
void VMusic::SetLoop |
( |
bool |
loop, |
|
|
float |
loopStart = 0 , |
|
|
float |
loopEnd = 0 |
|
) |
| |
- Parameters
-
loop | If true, music will now loop. |
loopStart | The starting point of the loop as time in seconds. |
loopEnd | The ending point of a loop as time in seconds. If 0, loop End will be the total length of the music track. |
◆ SetMinDistance()
void VMusic::SetMinDistance |
( |
float |
distance | ) |
|
- Parameters
-
distance | New Minimum distance before attenuation takes effect. |
◆ SetPitch()
void VMusic::SetPitch |
( |
float |
pitch | ) |
|
- Parameters
-
pitch | Pitch of audio (and tempo) |
◆ SetPlayOffset()
void VMusic::SetPlayOffset |
( |
float |
offset | ) |
|
- Parameters
-
offset | New position time of music. |
◆ SetPosition() [1/2]
void VMusic::SetPosition |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
- Parameters
-
x | X Position of music being played in 3D space. |
y | Y Position of music being played in 3D space. |
z | Z Position of music being played in 3D space. |
◆ SetPosition() [2/2]
void VMusic::SetPosition |
( |
const sf::Vector3f & |
position | ) |
|
- Parameters
-
position | New Position of music being played in 3D space. |
◆ SetRelativeToListener()
void VMusic::SetRelativeToListener |
( |
bool |
relative | ) |
|
- Parameters
-
relative | If position is relative to listener. |
◆ SetVolume()
void VMusic::SetVolume |
( |
float |
volume | ) |
|
◆ Status()
sf::SoundStream::Status VMusic::Status |
( |
| ) |
|
- Returns
- Status of current music (i.e. Playing, Paused, Stopped).
◆ Update()
void VMusic::Update |
( |
float |
dt | ) |
|
Updates music and volume.
- Parameters
-
dt | Delta Time between the previous and current frame. |
◆ Volume()
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/VMusic.h