ChaiLove API  2.0.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.
 
bool isLooping ()
 Returns whether the Source will loop. More...
 
SoundDatasetLooping (bool loop)
 Set whether the Source should loop. More...
 
SoundDatasetVolume (float volume)
 Set the volume for the sound. More...
 
float getVolume ()
 Retrieve the volume for the sound.
 
bool isPlaying ()
 Returns true or false depending on if the sound is actively playing.
 

Detailed Description

Contains audio samples that you can playback.

Member Function Documentation

◆ isLooping()

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

Returns whether the Source will loop.

See also
setLooping

◆ 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)

Set the volume for the sound.

Parameters
volumeA float from 0.0f to 1.0f.