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

A generic implementation of a sound instance. Provides the basic functionality while not tied to any specific audio backend. More...

#include <generic_sound_instance.h>

Inheritance diagram for GenericSoundInstance:
[legend]

Public Member Functions

 GenericSoundInstance (std::shared_ptr< SoundResource > resource, float volume=1.0f)
 
 ~GenericSoundInstance () override=default
 
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

A generic implementation of a sound instance. Provides the basic functionality while not tied to any specific audio backend.

Constructor & Destructor Documentation

◆ GenericSoundInstance()

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

◆ ~GenericSoundInstance()

GenericSoundInstance::~GenericSoundInstance ( )
overridedefault

Member Function Documentation

◆ is_finished()

bool GenericSoundInstance::is_finished ( )
overridevirtual

Reimplemented from SoundInstance.

◆ is_paused()

bool GenericSoundInstance::is_paused ( ) const
overridevirtualnoexcept

Reimplemented from SoundInstance.

◆ is_playing()

bool GenericSoundInstance::is_playing ( ) const
overridevirtualnoexcept

Reimplemented from SoundInstance.

◆ pause()

void GenericSoundInstance::pause ( )
overridevirtual

Reimplemented from SoundInstance.

◆ play()

void GenericSoundInstance::play ( )
overridevirtual

Reimplemented from SoundInstance.

◆ resume()

void GenericSoundInstance::resume ( )
overridevirtual

Reimplemented from SoundInstance.

◆ stop()

void GenericSoundInstance::stop ( )
overridevirtual

Reimplemented from SoundInstance.


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