RhythmGame 1.4.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sounds::NormalSound Class Reference

#include <NormalSound.h>

Inheritance diagram for sounds::NormalSound:
Inheritance graph
[legend]
Collaboration diagram for sounds::NormalSound:
Collaboration graph
[legend]

Public Member Functions

 NormalSound (AudioEngine *engine, std::shared_ptr< const SoundBuffer > buffer)
 
 ~NormalSound () override
 
auto getBuffer () const -> const std::shared_ptr< const SoundBuffer > &
 
void play () override
 Plays the sound.
 
void stop () override
 Stops the sound.
 
void setVolume (float volume) override
 Sets the volume of the sound.
 
auto isPlaying () const -> bool override
 Is the sound playing right now?
 
auto getVolume () const -> float override
 Gets the volume of the sound.
 
- Public Member Functions inherited from sounds::Sound
virtual ~Sound ()=default
 

Constructor & Destructor Documentation

◆ NormalSound()

sounds::NormalSound::NormalSound ( AudioEngine *  engine,
std::shared_ptr< const SoundBuffer >  buffer 
)

◆ ~NormalSound()

sounds::NormalSound::~NormalSound ( )
override

Member Function Documentation

◆ getBuffer()

auto sounds::NormalSound::getBuffer ( ) const -> const std::shared_ptr<const SoundBuffer>&

◆ getVolume()

auto sounds::NormalSound::getVolume ( ) const -> float
overridevirtual

Gets the volume of the sound.

Returns
The volume. 1 is normal, 0 is silent, 2 is twice as loud.

Implements sounds::Sound.

◆ isPlaying()

auto sounds::NormalSound::isPlaying ( ) const -> bool
overridevirtual

Is the sound playing right now?

Implements sounds::Sound.

◆ play()

void sounds::NormalSound::play ( )
overridevirtual

Plays the sound.

This does not block, obviously. Make sure the sound object stays alive.

Implements sounds::Sound.

◆ setVolume()

void sounds::NormalSound::setVolume ( float  volume)
overridevirtual

Sets the volume of the sound.

Parameters
volumeThe volume. 1 is normal, 0 is silent, 2 is twice as loud.

Implements sounds::Sound.

◆ stop()

void sounds::NormalSound::stop ( )
overridevirtual

Stops the sound.

Does not block. The sound can be played again.

Implements sounds::Sound.


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