ScummVM API documentation
AGS3::SOUNDCLIP Struct Referenceabstract
Inheritance diagram for AGS3::SOUNDCLIP:
AGS3::MYMIDI AGS3::SoundClipWaveBase AGS3::SoundClipWave< SOUND_TYPE >

Public Member Functions

virtual int play ()=0
 
virtual void pause ()=0
 
virtual void resume ()=0
 
virtual void seek (int offset)=0
 
virtual void seek_ms (int pos_ms)=0
 
virtual int play_from (int position)=0
 
virtual bool is_playing ()=0
 
virtual bool is_paused ()=0
 
virtual int get_sound_type () const =0
 
virtual int get_pos ()=0
 
virtual int get_pos_ms ()=0
 
virtual int get_length_ms ()=0
 
virtual void set_panning (int newPanning)=0
 
virtual void set_speed (int new_speed)=0
 
virtual void poll ()=0
 
int get_volume100 () const
 
int get_volume255 () const
 
int get_panning () const
 
int get_speed () const
 
bool is_muted () const
 
void set_volume100 (int volume)
 
void set_volume255 (int volume)
 
void set_volume_direct (int vol_percent, int vol_absolute)
 
void set_mute (bool mute)
 
void apply_volume_modifier (int mod)
 
void apply_directional_modifier (int mod)
 
bool is_ready ()
 
bool update ()
 

Public Attributes

int _sourceClipID
 
int _sourceClipType
 
bool _repeat
 
int _priority
 
int _xSource
 
int _ySource
 
int _maximumPossibleDistanceAway
 
int _vol255
 
int _vol100
 
int _volModifier
 
int _panning
 
int _panningAsPercentage
 
int _directionalVolModifier
 

Protected Member Functions

virtual void adjust_volume ()=0
 
int get_final_volume () const
 

Protected Attributes

bool _muted = false
 
int _speed = 0
 
bool _paramsChanged = false
 

Member Function Documentation

◆ seek()

virtual void AGS3::SOUNDCLIP::seek ( int  offset)
pure virtual

Seeks to the position, where pos units depend on the audio type:

  • MIDI - the beat number
  • MOD / XM / S3M - the pattern number
  • WAV / VOC - the sample number
  • OGG / MP3 - milliseconds

Implemented in AGS3::SoundClipWaveBase, and AGS3::MYMIDI.

◆ seek_ms()

virtual void AGS3::SOUNDCLIP::seek_ms ( int  pos_ms)
pure virtual

Seeks to the position in milliseconds

Implemented in AGS3::SoundClipWaveBase, and AGS3::MYMIDI.

◆ get_sound_type()

virtual int AGS3::SOUNDCLIP::get_sound_type ( ) const
pure virtual

Get legacy sound format type

Implemented in AGS3::SoundClipWave< SOUND_TYPE >, and AGS3::MYMIDI.

◆ get_pos()

virtual int AGS3::SOUNDCLIP::get_pos ( )
pure virtual

Return current position in frames

Implemented in AGS3::SoundClipWaveBase, and AGS3::MYMIDI.

◆ get_pos_ms()

virtual int AGS3::SOUNDCLIP::get_pos_ms ( )
pure virtual

Return the position in milliseconds

Implemented in AGS3::SoundClipWaveBase, and AGS3::MYMIDI.

◆ get_length_ms()

virtual int AGS3::SOUNDCLIP::get_length_ms ( )
pure virtual

Return total track length in ms (or 0)

Implemented in AGS3::SoundClipWaveBase, and AGS3::MYMIDI.

◆ get_volume100()

int AGS3::SOUNDCLIP::get_volume100 ( ) const
inline

Gets clip's volume property, as percentage (0 - 100); note this may not be the real volume of playback (which could e.g. be muted)

◆ get_volume255()

int AGS3::SOUNDCLIP::get_volume255 ( ) const
inline

Gets clip's volume measured in 255 units

◆ get_panning()

int AGS3::SOUNDCLIP::get_panning ( ) const
inline

Gets clip's panning (-100 - +100)

◆ get_speed()

int AGS3::SOUNDCLIP::get_speed ( ) const
inline

Gets clip's playback speed in clip ms per real second

◆ is_muted()

bool AGS3::SOUNDCLIP::is_muted ( ) const
inline

Gets if clip is muted (without changing the volume setting)

◆ set_volume100()

void AGS3::SOUNDCLIP::set_volume100 ( int  volume)

Sets the current volume property, as percentage (0 - 100)

◆ set_volume255()

void AGS3::SOUNDCLIP::set_volume255 ( int  volume)

Sets the current volume property, as a level (0 - 255)

◆ set_volume_direct()

void AGS3::SOUNDCLIP::set_volume_direct ( int  vol_percent,
int  vol_absolute 
)

Explicitly defines both percentage and absolute volume value, without calculating it from given percentage. NOTE: this overrides the mute

◆ set_mute()

void AGS3::SOUNDCLIP::set_mute ( bool  mute)

Mutes sound clip, while preserving current volume property for the future reference; when unmuted, that property is used to restart previous volume.

◆ apply_volume_modifier()

void AGS3::SOUNDCLIP::apply_volume_modifier ( int  mod)

Apply arbitrary permanent volume modifier, in absolute units (0 - 255); this is distinct value that is used in conjunction with current volume (can be both positive and negative).

◆ apply_directional_modifier()

void AGS3::SOUNDCLIP::apply_directional_modifier ( int  mod)

Apply permanent directional volume modifier, in absolute units (0 - 255) this is distinct value that is used in conjunction with current volume (can be both positive and negative).

◆ update()

bool AGS3::SOUNDCLIP::update ( )

Returns if the clip is still playing, otherwise it's finished


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