XPMP2
X-Plane multiplayer library 2 - using instancing
Public Member Functions | Public Attributes | List of all members
XPMP2::SoundChannel Class Reference

A sound object being played, called channel. More...

#include <Sound.h>

Public Member Functions

 SoundChannel ()
 Default Constructor creates an invalid object. More...
 
 SoundChannel (FMOD_CHANNEL *c, SoundFile *s, float v)
 Constructor. More...
 
 operator bool () const
 Has valid pointers? (Doesn't say if actual objects are valid any longer) More...
 
bool ShallUnpause ()
 Need to unpause now? (returns true only once when countdown reaches zero) More...
 

Public Attributes

FMOD_CHANNEL * pChn = nullptr
 the actual sound channel More...
 
SoundFilepSnd = nullptr
 the sound file the sound was created from More...
 
float vol = 1.0f
 volume (if not muted) More...
 
bool bMuted = false
 currently muted? More...
 
int nPauseCountdown = 2
 frame till unpause this sound (starts paused to avoid crackling) More...
 

Detailed Description

A sound object being played, called channel.

Constructor & Destructor Documentation

◆ SoundChannel() [1/2]

XPMP2::SoundChannel::SoundChannel ( )
inline

Default Constructor creates an invalid object.

◆ SoundChannel() [2/2]

XPMP2::SoundChannel::SoundChannel ( FMOD_CHANNEL *  c,
SoundFile s,
float  v 
)
inline

Constructor.

Member Function Documentation

◆ operator bool()

XPMP2::SoundChannel::operator bool ( ) const
inline

Has valid pointers? (Doesn't say if actual objects are valid any longer)

◆ ShallUnpause()

bool XPMP2::SoundChannel::ShallUnpause ( )
inline

Need to unpause now? (returns true only once when countdown reaches zero)

Member Data Documentation

◆ bMuted

bool XPMP2::SoundChannel::bMuted = false

currently muted?

◆ nPauseCountdown

int XPMP2::SoundChannel::nPauseCountdown = 2

frame till unpause this sound (starts paused to avoid crackling)

◆ pChn

FMOD_CHANNEL* XPMP2::SoundChannel::pChn = nullptr

the actual sound channel

◆ pSnd

SoundFile* XPMP2::SoundChannel::pSnd = nullptr

the sound file the sound was created from

◆ vol

float XPMP2::SoundChannel::vol = 1.0f

volume (if not muted)


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