Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
AudioSound Class Reference

#include <pandadoc.hpp>

Inheritance diagram for AudioSound:
TypedReferenceCount TypedObject ReferenceCount

Public Types

enum  SoundStatus { BAD = 0 , READY = 1 , PLAYING = 2 }
 

Public Member Functions

bool configureFilters (FilterProperties config)
 
float get3dMaxDistance ()
 
float get3dMinDistance ()
 
bool getActive ()
 
float getBalance ()
 
str getFinishedEvent ()
 
bool getLoop ()
 
unsigned long int getLoopCount ()
 
str getName ()
 
float getPlayRate ()
 
int getPriority ()
 
float getSpeakerLevel (int index)
 
float getSpeakerMix (int speaker)
 
float getTime ()
 
float getVolume ()
 
float length ()
 
 output (Ostream out)
 
 play ()
 
 set3dAttributes (float px, float py, float pz, float vx, float vy, float vz)
 
 set3dMaxDistance (float dist)
 
 set3dMinDistance (float dist)
 
 setActive (bool flag)
 
 setBalance (float balance_right)
 
 setFinishedEvent (str event)
 
 setLoop (bool loop)
 
 setLoopCount (unsigned long int loop_count)
 
 setPlayRate (float play_rate)
 
 setPriority (int priority)
 
 setSpeakerLevels (float level1, float level2, float level3, float level4, float level5, float level6, float level7, float level8, float level9)
 
 setSpeakerMix (float frontleft, float frontright, float center, float sub, float backleft, float backright, float sideleft, float sideright)
 
 setTime (float start_time)
 Control time position within the sound, in seconds.
 
 setVolume (float volume)
 
AudioSound::SoundStatus status ()
 
 stop ()
 
 write (Ostream out)
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly.
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type.
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count.
 
 ref ()
 Explicitly increments the reference count.
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus.
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
 
bool unref ()
 Explicitly decrements the reference count.
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type.
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count.
 

Member Enumeration Documentation

◆ SoundStatus

Enumerator
BAD 
READY 
PLAYING 

Member Function Documentation

◆ configureFilters()

bool configureFilters ( FilterProperties config)

◆ get3dMaxDistance()

float get3dMaxDistance ( )

◆ get3dMinDistance()

float get3dMinDistance ( )

◆ getActive()

bool getActive ( )

◆ getBalance()

float getBalance ( )

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getFinishedEvent()

str getFinishedEvent ( )

◆ getLoop()

bool getLoop ( )

◆ getLoopCount()

unsigned long int getLoopCount ( )

◆ getName()

str getName ( )

◆ getPlayRate()

float getPlayRate ( )

◆ getPriority()

int getPriority ( )

◆ getSpeakerLevel()

float getSpeakerLevel ( int index)

◆ getSpeakerMix()

float getSpeakerMix ( int speaker)

◆ getTime()

float getTime ( )

◆ getVolume()

float getVolume ( )

◆ length()

float length ( )

◆ output()

output ( Ostream out)

◆ play()

play ( )

◆ set3dAttributes()

set3dAttributes ( float px,
float py,
float pz,
float vx,
float vy,
float vz )

◆ set3dMaxDistance()

set3dMaxDistance ( float dist)

◆ set3dMinDistance()

set3dMinDistance ( float dist)

◆ setActive()

setActive ( bool flag)

◆ setBalance()

setBalance ( float balance_right)

◆ setFinishedEvent()

setFinishedEvent ( str event)

◆ setLoop()

setLoop ( bool loop)

◆ setLoopCount()

setLoopCount ( unsigned long int loop_count)

◆ setPlayRate()

setPlayRate ( float play_rate)

◆ setPriority()

setPriority ( int priority)

◆ setSpeakerLevels()

setSpeakerLevels ( float level1,
float level2,
float level3,
float level4,
float level5,
float level6,
float level7,
float level8,
float level9 )

◆ setSpeakerMix()

setSpeakerMix ( float frontleft,
float frontright,
float center,
float sub,
float backleft,
float backright,
float sideleft,
float sideright )

◆ setTime()

setTime ( float start_time)

Control time position within the sound, in seconds.

This is similar (in concept) to the seek position within a file. The value starts at 0.0 (the default) and ends at the value given by the length() method.

The current time position will not change while the sound is playing; you must call play() again to effect the change. To play the same sound from a time offset a second time, explicitly set the time position again. When looping, the second and later loops will start from the beginning of the sound.

If a sound is playing, calling get_time() repeatedly will return different results over time. e.g.

PN_stdfloat percent_complete = s.get_time() / s.length();

◆ setVolume()

setVolume ( float volume)

◆ status()

◆ stop()

stop ( )

◆ write()

write ( Ostream out)