ScummVM API documentation
Mohawk::RivenSoundManager Class Reference

#include <riven_sound.h>

Public Member Functions

 RivenSoundManager (MohawkEngine_Riven *vm)
 
void playSound (uint16 id, uint16 volume=255, bool playOnDraw=false)
 
void playCardSound (const Common::String &name, uint16 volume=255, bool playOnDraw=false)
 
void triggerDrawSound ()
 
bool isEffectPlaying () const
 
void stopSound ()
 
void playSLST (const SLSTRecord &slstRecord)
 
void stopAllSLST (bool fade=false)
 
void updateSLST ()
 

Detailed Description

Sound manager for Riven

The sound manager can play simulteaneously:

  • An effect sound
  • A list of ambient sounds

The list of ambient sounds can be cross faded with the previously running ambient sounds.

Member Function Documentation

◆ playSound()

void Mohawk::RivenSoundManager::playSound ( uint16  id,
uint16  volume = 255,
bool  playOnDraw = false 
)

Play an effect sound

Parameters
idSound ID in the stack
volumePlayback volume, between 0 and 255
playOnDrawStart playing when the current card is drawn instead of immediately

◆ playCardSound()

void Mohawk::RivenSoundManager::playCardSound ( const Common::String name,
uint16  volume = 255,
bool  playOnDraw = false 
)

Play an effect sound by its resource name

◆ triggerDrawSound()

void Mohawk::RivenSoundManager::triggerDrawSound ( )

Start playing the scheduled on-draw effect sound, if any. Called by the GraphicsManager.

◆ isEffectPlaying()

bool Mohawk::RivenSoundManager::isEffectPlaying ( ) const

Is an effect sound currently playing?

◆ stopSound()

void Mohawk::RivenSoundManager::stopSound ( )

Stop playing the current effect sound, if any

◆ playSLST()

void Mohawk::RivenSoundManager::playSLST ( const SLSTRecord slstRecord)

Start playing an ambient sound list

◆ stopAllSLST()

void Mohawk::RivenSoundManager::stopAllSLST ( bool  fade = false)

Stop playing the current ambient sounds

◆ updateSLST()

void Mohawk::RivenSoundManager::updateSLST ( )

Update the ambient sounds for fading. Called once per frame.


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