Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
NullAudioSound Class Reference
Inheritance diagram for NullAudioSound:
AudioSound TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

Public Member Functions

 NullAudioSound ()
 All of these functions are just stubs.
 
virtual TypeHandle force_init_type ()
 
void get_3d_attributes (PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz, PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz)
 
PN_stdfloat get_3d_max_distance () const
 
PN_stdfloat get_3d_min_distance () const
 
bool get_active () const
 
PN_stdfloat get_balance () const
 
const std::string & get_finished_event () const
 
bool get_loop () const
 
unsigned long get_loop_count () const
 
const std::string & get_name () const
 
PN_stdfloat get_play_rate () const
 
PN_stdfloat get_time () const
 
virtual TypeHandle get_type () const
 
PN_stdfloat get_volume () const
 
PN_stdfloat length () const
 
void play ()
 
void set_3d_attributes (PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz)
 
void set_3d_max_distance (PN_stdfloat dist)
 
void set_3d_min_distance (PN_stdfloat dist)
 
void set_active (bool)
 
void set_balance (PN_stdfloat)
 
void set_finished_event (const std::string &event)
 
void set_loop (bool)
 
void set_loop_count (unsigned long)
 
void set_play_rate (PN_stdfloat)
 
void set_time (PN_stdfloat)
 Control time position within the sound, in seconds.
 
void set_volume (PN_stdfloat)
 
AudioSound::SoundStatus status () const
 
void stop ()
 
- Public Member Functions inherited from AudioSound
virtual bool configure_filters (FilterProperties *config)
 Configure the local DSP filter chain.
 
virtual int get_priority ()
 
virtual PN_stdfloat get_speaker_level (int index)
 For use only with Miles.
 
virtual PN_stdfloat get_speaker_mix (int speaker)
 For use only with FMOD.
 
virtual void output (std::ostream &out) const
 
virtual void set_priority (int priority)
 
virtual void set_speaker_levels (PN_stdfloat level1, PN_stdfloat level2=-1.0f, PN_stdfloat level3=-1.0f, PN_stdfloat level4=-1.0f, PN_stdfloat level5=-1.0f, PN_stdfloat level6=-1.0f, PN_stdfloat level7=-1.0f, PN_stdfloat level8=-1.0f, PN_stdfloat level9=-1.0f)
 For use only with Miles.
 
virtual void set_speaker_mix (PN_stdfloat frontleft, PN_stdfloat frontright, PN_stdfloat center, PN_stdfloat sub, PN_stdfloat backleft, PN_stdfloat backright, PN_stdfloat sideleft, PN_stdfloat sideright)
 For use only with FMOD.
 
virtual void write (std::ostream &out) const
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object.
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
 
void ref () const
 Explicitly increments the reference count.
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero.
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
 
virtual bool unref () const
 Explicitly decrements the reference count.
 
bool unref_if_one () const
 Atomically decreases the reference count of this object if it is one.
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object.
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object.
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from AudioSound
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Friends

class NullAudioManager
 

Additional Inherited Members

- Public Types inherited from AudioSound
enum  SoundStatus { BAD , READY , PLAYING }
 
- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count.
 

Detailed Description

Definition at line 23 of file nullAudioSound.h.

Constructor & Destructor Documentation

◆ ~NullAudioSound()

NullAudioSound::~NullAudioSound ( )

Definition at line 33 of file nullAudioSound.cxx.

◆ NullAudioSound()

NullAudioSound::NullAudioSound ( )

All of these functions are just stubs.

Definition at line 29 of file nullAudioSound.cxx.

Member Function Documentation

◆ force_init_type()

virtual TypeHandle NullAudioSound::force_init_type ( )
inlinevirtual

Reimplemented from AudioSound.

Definition at line 86 of file nullAudioSound.h.

◆ get_3d_attributes()

void NullAudioSound::get_3d_attributes ( PN_stdfloat * px,
PN_stdfloat * py,
PN_stdfloat * pz,
PN_stdfloat * vx,
PN_stdfloat * vy,
PN_stdfloat * vz )
virtual

Reimplemented from AudioSound.

Definition at line 121 of file nullAudioSound.cxx.

◆ get_3d_max_distance()

PN_stdfloat NullAudioSound::get_3d_max_distance ( ) const
virtual

Reimplemented from AudioSound.

Definition at line 138 of file nullAudioSound.cxx.

◆ get_3d_min_distance()

PN_stdfloat NullAudioSound::get_3d_min_distance ( ) const
virtual

Reimplemented from AudioSound.

Definition at line 129 of file nullAudioSound.cxx.

◆ get_active()

bool NullAudioSound::get_active ( ) const
virtual

Implements AudioSound.

Definition at line 97 of file nullAudioSound.cxx.

◆ get_balance()

PN_stdfloat NullAudioSound::get_balance ( ) const
virtual

Implements AudioSound.

Definition at line 81 of file nullAudioSound.cxx.

◆ get_class_type()

static TypeHandle NullAudioSound::get_class_type ( )
inlinestatic

Definition at line 75 of file nullAudioSound.h.

◆ get_finished_event()

const string & NullAudioSound::get_finished_event ( ) const
virtual

Implements AudioSound.

Definition at line 105 of file nullAudioSound.cxx.

◆ get_loop()

bool NullAudioSound::get_loop ( ) const
virtual

Implements AudioSound.

Definition at line 49 of file nullAudioSound.cxx.

◆ get_loop_count()

unsigned long NullAudioSound::get_loop_count ( ) const
virtual

Implements AudioSound.

Definition at line 57 of file nullAudioSound.cxx.

◆ get_name()

const string & NullAudioSound::get_name ( ) const
virtual

Implements AudioSound.

Definition at line 109 of file nullAudioSound.cxx.

◆ get_play_rate()

PN_stdfloat NullAudioSound::get_play_rate ( ) const
virtual

Implements AudioSound.

Definition at line 89 of file nullAudioSound.cxx.

◆ get_time()

PN_stdfloat NullAudioSound::get_time ( ) const
virtual

Implements AudioSound.

Definition at line 65 of file nullAudioSound.cxx.

◆ get_type()

virtual TypeHandle NullAudioSound::get_type ( ) const
inlinevirtual

Reimplemented from AudioSound.

Definition at line 83 of file nullAudioSound.h.

◆ get_volume()

PN_stdfloat NullAudioSound::get_volume ( ) const
virtual

Implements AudioSound.

Definition at line 73 of file nullAudioSound.cxx.

◆ init_type()

static void NullAudioSound::init_type ( )
inlinestatic

Definition at line 78 of file nullAudioSound.h.

◆ length()

PN_stdfloat NullAudioSound::length ( ) const
virtual

Implements AudioSound.

Definition at line 113 of file nullAudioSound.cxx.

◆ play()

void NullAudioSound::play ( )
virtual

Implements AudioSound.

Definition at line 37 of file nullAudioSound.cxx.

◆ set_3d_attributes()

void NullAudioSound::set_3d_attributes ( PN_stdfloat px,
PN_stdfloat py,
PN_stdfloat pz,
PN_stdfloat vx,
PN_stdfloat vy,
PN_stdfloat vz )
virtual

Reimplemented from AudioSound.

Definition at line 117 of file nullAudioSound.cxx.

◆ set_3d_max_distance()

void NullAudioSound::set_3d_max_distance ( PN_stdfloat dist)
virtual

Reimplemented from AudioSound.

Definition at line 134 of file nullAudioSound.cxx.

◆ set_3d_min_distance()

void NullAudioSound::set_3d_min_distance ( PN_stdfloat dist)
virtual

Reimplemented from AudioSound.

Definition at line 125 of file nullAudioSound.cxx.

◆ set_active()

void NullAudioSound::set_active ( bool )
virtual

Implements AudioSound.

Definition at line 93 of file nullAudioSound.cxx.

◆ set_balance()

void NullAudioSound::set_balance ( PN_stdfloat )
virtual

Implements AudioSound.

Definition at line 77 of file nullAudioSound.cxx.

◆ set_finished_event()

void NullAudioSound::set_finished_event ( const std::string & event)
virtual

Implements AudioSound.

Definition at line 101 of file nullAudioSound.cxx.

◆ set_loop()

void NullAudioSound::set_loop ( bool )
virtual

Implements AudioSound.

Definition at line 45 of file nullAudioSound.cxx.

◆ set_loop_count()

void NullAudioSound::set_loop_count ( unsigned long )
virtual

Implements AudioSound.

Definition at line 53 of file nullAudioSound.cxx.

◆ set_play_rate()

void NullAudioSound::set_play_rate ( PN_stdfloat )
virtual

Implements AudioSound.

Definition at line 85 of file nullAudioSound.cxx.

◆ set_time()

void NullAudioSound::set_time ( PN_stdfloat start_time)
virtual

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();

Implements AudioSound.

Definition at line 61 of file nullAudioSound.cxx.

◆ set_volume()

void NullAudioSound::set_volume ( PN_stdfloat )
virtual

Implements AudioSound.

Definition at line 69 of file nullAudioSound.cxx.

◆ status()

AudioSound::SoundStatus NullAudioSound::status ( ) const
virtual

Implements AudioSound.

Definition at line 143 of file nullAudioSound.cxx.

◆ stop()

void NullAudioSound::stop ( )
virtual

Implements AudioSound.

Definition at line 41 of file nullAudioSound.cxx.

Friends And Related Symbol Documentation

◆ NullAudioManager

friend class NullAudioManager
friend

Definition at line 91 of file nullAudioSound.h.


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