#include <AudioPlayer.h>
◆ AudioPlayer()
AudioPlayer::AudioPlayer |
( |
| ) |
|
|
default |
◆ ~AudioPlayer()
AudioPlayer::~AudioPlayer |
( |
| ) |
|
|
virtualdefault |
◆ getSoundLength()
float AudioPlayer::getSoundLength |
( |
SoundId |
eSoundID | ) |
|
Returns length of sound in seconds.
- Parameters
-
◆ Initialize()
void AudioPlayer::Initialize |
( |
| ) |
|
◆ isWalkingSoundPlays()
bool AudioPlayer::isWalkingSoundPlays |
( |
| ) |
|
◆ LoadSound()
Blob AudioPlayer::LoadSound |
( |
std::string_view |
pSoundName | ) |
|
◆ loadSoundDataSource()
bool AudioPlayer::loadSoundDataSource |
( |
SoundInfo * |
si | ) |
|
Checks that data source has been populated and if not loads it into SoundInfo. Returns true on success
- Parameters
-
◆ MusicPause()
void AudioPlayer::MusicPause |
( |
| ) |
|
◆ MusicPlayTrack()
void AudioPlayer::MusicPlayTrack |
( |
MusicId |
eTrack | ) |
|
◆ MusicResume()
void AudioPlayer::MusicResume |
( |
| ) |
|
◆ MusicStart()
void AudioPlayer::MusicStart |
( |
| ) |
|
◆ MusicStop()
void AudioPlayer::MusicStop |
( |
| ) |
|
◆ pauseAllSounds()
void AudioPlayer::pauseAllSounds |
( |
| ) |
|
◆ pauseLooping()
void AudioPlayer::pauseLooping |
( |
| ) |
|
◆ playExclusiveSound()
void AudioPlayer::playExclusiveSound |
( |
SoundId |
id | ) |
|
|
inline |
Play sound in exclusive mode. It means that if sound with the same ID has not finished playing it's playing be stopped and then restarted from beginning.
- Parameters
-
◆ playHouseSound()
void AudioPlayer::playHouseSound |
( |
SoundId |
id, |
|
|
bool |
isSpeech |
|
) |
| |
|
inline |
Play sound of houses. To avoid multiple sounds when entering/leaving repeatedly sounds needs to be stopped.
- Parameters
-
id | ID of sound. |
isSpeech | true if this is house greet/goodbye speech. false if this is entering/cloosing UI sound. |
◆ playNonResetableSound()
void AudioPlayer::playNonResetableSound |
( |
SoundId |
id | ) |
|
|
inline |
Play sound in non-resetable mode. It means that if sound with the same ID has not finished playing, this call is effectively ignored. New playing of such sound can only start when previous one has finished playing.
- Parameters
-
◆ playSound()
Play sound.
- Parameters
-
eSoundID | ID of sound. |
mode | Playback mode. |
pid | Pid of sound source. |
◆ playSpellSound()
Play sound of spell casting or spell sprite impact.
- Parameters
-
spell | Spell ID of spell. Indexes into SpellSoundIds . |
is_impact | Indicates sound of spell impact, if true sound ID will be SpellSoundIds[spell] + 1. |
mode | Playback mode. |
pid | Pid of sound originator. See playSound description. |
◆ playUISound()
void AudioPlayer::playUISound |
( |
SoundId |
id | ) |
|
|
inline |
Play generic UI sound. Generic sounds are played in non-exclusive mode - it meand that each call to this function will play sound even if sound with the same ID has not finished playing.
- Parameters
-
◆ playWalkSound()
void AudioPlayer::playWalkSound |
( |
SoundId |
id | ) |
|
|
inline |
Play sound of party walking. Semantics generally is the same as for exclusive sounds but with additional tracking to stop walking sound when needed.
- Parameters
-
◆ resumeSounds()
void AudioPlayer::resumeSounds |
( |
| ) |
|
◆ SetMasterVolume()
void AudioPlayer::SetMasterVolume |
( |
int |
level | ) |
|
◆ SetMusicVolume()
void AudioPlayer::SetMusicVolume |
( |
int |
level | ) |
|
◆ SetVoiceVolume()
void AudioPlayer::SetVoiceVolume |
( |
int |
level | ) |
|
◆ soundDrain()
void AudioPlayer::soundDrain |
( |
| ) |
|
◆ stopSounds()
void AudioPlayer::stopSounds |
( |
| ) |
|
◆ stopVoiceSounds()
void AudioPlayer::stopVoiceSounds |
( |
| ) |
|
◆ stopWalkingSounds()
void AudioPlayer::stopWalkingSounds |
( |
| ) |
|
◆ UpdateSounds()
void AudioPlayer::UpdateSounds |
( |
| ) |
|
◆ UpdateVolumeFromConfig()
void AudioPlayer::UpdateVolumeFromConfig |
( |
| ) |
|
◆ _currentWalkingSample
◆ _loopingSoundPool
◆ _regularSoundPool
◆ _sndReader
◆ _voiceSoundPool
◆ bPlayerReady
bool AudioPlayer::bPlayerReady = false |
|
protected |
◆ currentMusicTrack
◆ pCurrentMusicTrack
◆ uMasterVolume
float AudioPlayer::uMasterVolume = 0 |
|
protected |
◆ uMusicVolume
float AudioPlayer::uMusicVolume = 0 |
|
protected |
◆ uVoiceVolume
float AudioPlayer::uVoiceVolume = 0 |
|
protected |
The documentation for this class was generated from the following files: