Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
SDLSoundInstance Class Reference

Represents a SDL-specific implementation of a sound instance. Inherits from the generic SoundInstance class and contains all SDL logic. More...

#include <sdl_sound_instance.h>

Inheritance diagram for SDLSoundInstance:
[legend]

Public Member Functions

 SDLSoundInstance (std::shared_ptr< SoundResource > resource, float volume=1.0f)
 
 ~SDLSoundInstance () override
 
void play () override
 
void pause () override
 
void resume () override
 
void stop () override
 
bool is_playing () const noexcept override
 
bool is_paused () const noexcept override
 
bool is_finished () override
 
- Public Member Functions inherited from SoundInstance
 SoundInstance (std::shared_ptr< SoundResource > resource, float volume=1.0f)
 
virtual ~SoundInstance ()=default
 
const std::shared_ptr< SoundResource > & resource () const noexcept
 
float volume () const noexcept
 
void volume (float volume) noexcept
 
bool finished () const noexcept
 
void finished (bool finished) noexcept
 
bool loop () const noexcept
 
void loop (bool loop) noexcept
 

Additional Inherited Members

- Protected Attributes inherited from SoundInstance
std::shared_ptr< SoundResourceresource_
 
bool loop_ {false}
 
bool playing_ {false}
 
bool paused_ {false}
 
bool finished_ {false}
 
float volume_ {1.0f}
 

Detailed Description

Represents a SDL-specific implementation of a sound instance. Inherits from the generic SoundInstance class and contains all SDL logic.

Constructor & Destructor Documentation

◆ SDLSoundInstance()

SDLSoundInstance::SDLSoundInstance ( std::shared_ptr< SoundResource resource,
float  volume = 1.0f 
)

◆ ~SDLSoundInstance()

SDLSoundInstance::~SDLSoundInstance ( )
override

Member Function Documentation

◆ is_finished()

bool SDLSoundInstance::is_finished ( )
overridevirtual

Reimplemented from SoundInstance.

◆ is_paused()

bool SDLSoundInstance::is_paused ( ) const
overridevirtualnoexcept

Reimplemented from SoundInstance.

◆ is_playing()

bool SDLSoundInstance::is_playing ( ) const
overridevirtualnoexcept

Reimplemented from SoundInstance.

◆ pause()

void SDLSoundInstance::pause ( )
overridevirtual

Reimplemented from SoundInstance.

◆ play()

void SDLSoundInstance::play ( )
overridevirtual

Reimplemented from SoundInstance.

◆ resume()

void SDLSoundInstance::resume ( )
overridevirtual

Reimplemented from SoundInstance.

◆ stop()

void SDLSoundInstance::stop ( )
overridevirtual

Reimplemented from SoundInstance.


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