|
| Sound (AsylumEngine *engine, Audio::Mixer *mixer) |
|
void | playSound (ResourceId resourceId, bool looping=false, int32 volume=Config.sfxVolume, int32 panning=0) |
|
void | playMusic (ResourceId resourceId, int32 volume=Config.musicVolume) |
|
void | changeMusic (int32 index, int32 musicStatusExt) |
|
bool | isPlaying (ResourceId resourceId) |
|
void | setVolume (ResourceId resourceId, int32 volume) |
|
void | setMusicVolume (int32 volume) |
|
int32 | getMusicVolume () |
|
void | setPanning (ResourceId resourceId, int32 panning) |
|
int32 | calculateVolumeAdjustement (const Common::Point &point, int32 attenuation, int32 delta) |
|
int32 | getAdjustedVolume (int32 volume) const |
|
int32 | calculatePanningAtPoint (const Common::Point &point) |
|
void | stop (ResourceId resourceId) |
|
void | stopAll (ResourceId resourceId) |
|
void | stopAll () |
|
void | stopMusic () |
|
◆ playSound()
void Asylum::Sound::playSound |
( |
ResourceId |
resourceId, |
|
|
bool |
looping = false , |
|
|
int32 |
volume = Config.sfxVolume , |
|
|
int32 |
panning = 0 |
|
) |
| |
Play sound
- Parameters
-
resourceId | Identifier for the resource. |
looping | true to looping. |
volume | The volume. |
panning | The panning. |
◆ playMusic()
void Asylum::Sound::playMusic |
( |
ResourceId |
resourceId, |
|
|
int32 |
volume = Config.musicVolume |
|
) |
| |
Play music
- Parameters
-
resourceId | Identifier for the resource. |
volume | The volume. |
◆ changeMusic()
void Asylum::Sound::changeMusic |
( |
int32 |
index, |
|
|
int32 |
musicStatusExt |
|
) |
| |
Change music
- Parameters
-
index | Zero-based index of the music |
musicStatusExt | The music status. |
◆ isPlaying()
bool Asylum::Sound::isPlaying |
( |
ResourceId |
resourceId | ) |
|
Query if a sound with the resource id is playing.
- Parameters
-
resourceId | Identifier for the resource. |
- Returns
- true if playing, false if not.
◆ setVolume()
void Asylum::Sound::setVolume |
( |
ResourceId |
resourceId, |
|
|
int32 |
volume |
|
) |
| |
Sets the volume for a buffered sound resource
- Parameters
-
resourceId | Identifier for the resource. |
volume | The volume. |
◆ setMusicVolume()
void Asylum::Sound::setMusicVolume |
( |
int32 |
volume | ) |
|
Sets the music volume.
- Parameters
-
◆ getMusicVolume()
int32 Asylum::Sound::getMusicVolume |
( |
| ) |
|
|
inline |
Gets the music volume.
- Returns
- The music volume.
◆ setPanning()
void Asylum::Sound::setPanning |
( |
ResourceId |
resourceId, |
|
|
int32 |
panning |
|
) |
| |
Sets the panning for a buffered sound resource
- Parameters
-
resourceId | Identifier for the resource. |
panning | The panning. |
◆ calculateVolumeAdjustement()
int32 Asylum::Sound::calculateVolumeAdjustement |
( |
const Common::Point & |
point, |
|
|
int32 |
attenuation, |
|
|
int32 |
delta |
|
) |
| |
Determine the amount to increase the supplied sound sample's volume based on the position.
- Parameters
-
point | The coordinates |
attenuation | The attenuation. |
delta | The delta. |
- Returns
- The calculated volume adjustement.
◆ getAdjustedVolume()
int32 Asylum::Sound::getAdjustedVolume |
( |
int32 |
volume | ) |
const |
Gets an adjusted volume.
- Parameters
-
- Returns
- The adjusted volume.
◆ calculatePanningAtPoint()
int32 Asylum::Sound::calculatePanningAtPoint |
( |
const Common::Point & |
point | ) |
|
Calculates the panning at point.
- Parameters
-
- Returns
- The calculated panning at point.
◆ stop()
void Asylum::Sound::stop |
( |
ResourceId |
resourceId | ) |
|
Stop the first playing sound with the ResourceId
- Parameters
-
resourceId | Identifier for the resource. |
◆ stopAll() [1/2]
void Asylum::Sound::stopAll |
( |
ResourceId |
resourceId | ) |
|
Stop all sounds with the ResourceId
- Parameters
-
resourceId | Identifier for the resource. |
◆ stopAll() [2/2]
void Asylum::Sound::stopAll |
( |
| ) |
|
◆ stopMusic()
void Asylum::Sound::stopMusic |
( |
| ) |
|
◆ convertVolumeFrom()
static void Asylum::Sound::convertVolumeFrom |
( |
int32 & |
vol | ) |
|
|
static |
Convert volume to a ScummVM mixer value
- Parameters
-
◆ convertVolumeTo()
static void Asylum::Sound::convertVolumeTo |
( |
int32 & |
vol | ) |
|
|
static |
Convert ScummVM mixer value to a volume
- Parameters
-
The documentation for this class was generated from the following file: