Project Alice
Loading...
Searching...
No Matches
sound::audio_instance Class Reference

#include <sound_nix.hpp>

Public Member Functions

 audio_instance ()=default
 
audio_instanceoperator= (audio_instance const &o)
 
 ~audio_instance ()
 
void set_file (native_string_view name)
 
 audio_instance ()
 
 audio_instance (std::wstring const &file)
 
 audio_instance (audio_instance const &)=delete
 
 audio_instance (audio_instance &&o) noexcept
 
 ~audio_instance ()
 
void set_file (std::wstring const &file)
 
void play (float volume, bool as_music, void *window_handle)
 
void pause () const
 
void resume () const
 
void stop () const
 
bool is_playing () const
 
void change_volume (float new_volume) const
 

Public Attributes

native_string filename
 
std::wstring filename
 
float volume_multiplier = 1.0f
 

Friends

class sound_impl
 

Detailed Description

Definition at line 8 of file sound_nix.hpp.

Constructor & Destructor Documentation

◆ audio_instance() [1/5]

sound::audio_instance::audio_instance ( )
default

◆ ~audio_instance() [1/2]

sound::audio_instance::~audio_instance ( )
inline

Definition at line 17 of file sound_nix.hpp.

◆ audio_instance() [2/5]

sound::audio_instance::audio_instance ( )
inline

Definition at line 24 of file sound_win.hpp.

◆ audio_instance() [3/5]

sound::audio_instance::audio_instance ( std::wstring const &  file)
inline

Definition at line 25 of file sound_win.hpp.

◆ audio_instance() [4/5]

sound::audio_instance::audio_instance ( audio_instance const &  )
delete

◆ audio_instance() [5/5]

sound::audio_instance::audio_instance ( audio_instance &&  o)
inlinenoexcept

Definition at line 27 of file sound_win.hpp.

◆ ~audio_instance() [2/2]

sound::audio_instance::~audio_instance ( )

Member Function Documentation

◆ change_volume()

void sound::audio_instance::change_volume ( float  new_volume) const

Definition at line 156 of file sound_win.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_playing()

bool sound::audio_instance::is_playing ( ) const

Definition at line 144 of file sound_win.cpp.

Here is the caller graph for this function:

◆ operator=()

audio_instance & sound::audio_instance::operator= ( audio_instance const &  o)
inline

Definition at line 13 of file sound_nix.hpp.

◆ pause()

void sound::audio_instance::pause ( ) const

Definition at line 131 of file sound_win.cpp.

Here is the caller graph for this function:

◆ play()

void sound::audio_instance::play ( float  volume,
bool  as_music,
void *  window_handle 
)

Definition at line 39 of file sound_win.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resume()

void sound::audio_instance::resume ( ) const

Definition at line 135 of file sound_win.cpp.

Here is the caller graph for this function:

◆ set_file() [1/2]

void sound::audio_instance::set_file ( native_string_view  name)
inline

Definition at line 18 of file sound_nix.hpp.

◆ set_file() [2/2]

void sound::audio_instance::set_file ( std::wstring const &  file)
inline

Definition at line 40 of file sound_win.hpp.

◆ stop()

void sound::audio_instance::stop ( ) const

Definition at line 139 of file sound_win.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ sound_impl

friend class sound_impl
friend

Definition at line 50 of file sound_win.hpp.

Member Data Documentation

◆ filename [1/2]

native_string sound::audio_instance::filename

Definition at line 10 of file sound_nix.hpp.

◆ filename [2/2]

std::wstring sound::audio_instance::filename

Definition at line 21 of file sound_win.hpp.

◆ volume_multiplier

float sound::audio_instance::volume_multiplier = 1.0f

Definition at line 22 of file sound_win.hpp.


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