ChaiLove API  0.28.0
Public Member Functions
love::Types::Audio::SoundData Class Reference

Contains audio samples that you can playback. More...

Public Member Functions

bool play ()
 Plays the source.
 
bool stop ()
 Stops the audio source.
 
float getVolume ()
 Gets the current volume of the Source. More...
 
SoundDatasetVolume (float volume)
 Sets the current volume of the Source. More...
 
bool isPlaying ()
 Returns whether the Source is playing. More...
 
bool isLooping ()
 Returns whether the Source will loop. More...
 
SoundDatasetLooping (bool loop)
 Set whether the Source should loop. More...
 

Detailed Description

Contains audio samples that you can playback.

Member Function Documentation

◆ getVolume()

float love::Types::Audio::SoundData::getVolume ( )

Gets the current volume of the Source.

Returns
The volume of the source, from 0.0f to 1.0f.
See also
setVolume

◆ isLooping()

bool love::Types::Audio::SoundData::isLooping ( )

Returns whether the Source will loop.

See also
setLooping

◆ isPlaying()

bool love::Types::Audio::SoundData::isPlaying ( )

Returns whether the Source is playing.

Returns
True if the sound is playing.

◆ setLooping()

SoundData& love::Types::Audio::SoundData::setLooping ( bool  loop)

Set whether the Source should loop.

See also
isLooping

◆ setVolume()

SoundData& love::Types::Audio::SoundData::setVolume ( float  volume)

Sets the current volume of the Source.

Parameters
volumeThe volume to set the source at, from 0.0f to 1.0f.
Returns
The SoundData object iself, to allow for method chaining.
See also
getVolume