raylib_impl 0.1.0
Vendor raylib 5.5 : IGraphic2Module / IGraphic3Module / IAudioModule
Loading...
Searching...
No Matches
RaySound Class Reference

Raylib Sound class - a LoadSoundAlias() of a RaySoundBuffer, does not own the buffer. Deleting the sound never touches the buffer. More...

#include <RaySound.hpp>

Inheritance diagram for RaySound:
Collaboration diagram for RaySound:

Public Member Functions

 RaySound (RaySoundBuffer &buffer)
 
 ~RaySound () override
 
bool isReady () const override
 
void play () override
 
void pause () override
 
void stop () override
 
void setVolume (float volume) override
 
float getVolume () const override
 
void setPosition (Vector3f position) override
 
Vector3f getPosition () const override
 
void setVelocity (Vector3f velocity) override
 
Vector3f getVelocity () const override
 

Detailed Description

Raylib Sound class - a LoadSoundAlias() of a RaySoundBuffer, does not own the buffer. Deleting the sound never touches the buffer.

play() restarts the sound, where raylib would overlap playbacks by default. This is the only deliberate divergence from IMusic::play() : an ISound is a one-shot, not a transport.

Constructor & Destructor Documentation

◆ RaySound()

RaySound::RaySound ( RaySoundBuffer &  buffer)
inline

◆ ~RaySound()

RaySound::~RaySound ( )
inlineoverride

Member Function Documentation

◆ getPosition()

Vector3f RaySound::getPosition ( ) const
inlineoverride

◆ getVelocity()

Vector3f RaySound::getVelocity ( ) const
inlineoverride

◆ getVolume()

float RaySound::getVolume ( ) const
inlineoverride

◆ isReady()

bool RaySound::isReady ( ) const
inlineoverride

◆ pause()

void RaySound::pause ( )
inlineoverride

◆ play()

void RaySound::play ( )
inlineoverride

◆ setPosition()

void RaySound::setPosition ( Vector3f  position)
inlineoverride

◆ setVelocity()

void RaySound::setVelocity ( Vector3f  velocity)
inlineoverride

◆ setVolume()

void RaySound::setVolume ( float  volume)
inlineoverride

◆ stop()

void RaySound::stop ( )
inlineoverride

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