Public Member Functions | |
void | finished () |
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) |
Get position and velocity of this sound Currently unimplemented. More... | |
PN_stdfloat | get_3d_drop_off_factor () const |
Control the effect distance has on audability. More... | |
PN_stdfloat | get_3d_max_distance () const |
Get the distance that this sound stops falling off. More... | |
PN_stdfloat | get_3d_min_distance () const |
Get the distance that this sound begins to fall off. More... | |
bool | get_active () const |
Returns whether the sound has been marked "active". More... | |
PN_stdfloat | get_balance () const |
-1.0 to 1.0 scale -1 should be all the way left. More... | |
const string & | get_finished_event () const |
bool | get_loop () const |
Returns whether looping is on or off. More... | |
unsigned long | get_loop_count () const |
Return how many times a sound will loop. More... | |
const string & | get_name () const |
Get name of sound file. More... | |
PN_stdfloat | get_play_rate () const |
PN_stdfloat | get_time () const |
Gets the play position within the sound. More... | |
virtual TypeHandle | get_type () const |
PN_stdfloat | get_volume () const |
Gets the current volume of a sound. More... | |
PN_stdfloat | length () const |
Get length. More... | |
void | play () |
Plays a sound. More... | |
void | set_3d_attributes (PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz) |
Set position and velocity of this sound. More... | |
void | set_3d_drop_off_factor (PN_stdfloat factor) |
Control the effect distance has on audability. More... | |
void | set_3d_max_distance (PN_stdfloat dist) |
Set the distance that this sound stops falling off. More... | |
void | set_3d_min_distance (PN_stdfloat dist) |
Set the distance that this sound begins to fall off. More... | |
void | set_active (bool active=true) |
Sets whether the sound is marked "active". More... | |
void | set_balance (PN_stdfloat balance_right=0.0) |
-1.0 to 1.0 scale More... | |
void | set_finished_event (const string &event) |
void | set_loop (bool loop=true) |
Turns looping on and off. More... | |
void | set_loop_count (unsigned long loop_count=1) |
void | set_play_rate (PN_stdfloat play_rate=1.0f) |
Sets the speed at which a sound plays back. More... | |
void | set_time (PN_stdfloat time=0.0) |
The next time you call play, the sound will start from the specified offset. More... | |
void | set_volume (PN_stdfloat volume=1.0) |
0.0 to 1.0 scale of volume converted to Fmod's internal 0.0 to 255.0 scale. More... | |
AudioSound::SoundStatus | status () const |
Get status of the sound. More... | |
void | stop () |
Stop a sound. More... | |
![]() | |
virtual bool | configure_filters (FilterProperties *config) |
Configure the local DSP filter chain. More... | |
virtual int | get_priority () |
virtual PN_stdfloat | get_speaker_level (int index) |
For use only with Miles. More... | |
virtual PN_stdfloat | get_speaker_mix (int speaker) |
For use only with FMOD. More... | |
virtual void | output (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. More... | |
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. More... | |
virtual void | write (ostream &out) const |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
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. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
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. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Friends | |
class | OpenALAudioManager |
Additional Inherited Members | |
![]() | |
enum | SoundStatus { BAD, READY, PLAYING } |
Definition at line 35 of file openalAudioSound.h.
|
virtual |
Get position and velocity of this sound Currently unimplemented.
Get the attributes of the attached object.
Reimplemented from AudioSound.
Definition at line 722 of file openalAudioSound.cxx.
Referenced by play().
PN_stdfloat OpenALAudioSound::get_3d_drop_off_factor | ( | ) | const |
Control the effect distance has on audability.
Defaults to 1.0
Definition at line 819 of file openalAudioSound.cxx.
|
virtual |
Get the distance that this sound stops falling off.
Reimplemented from AudioSound.
Definition at line 788 of file openalAudioSound.cxx.
|
virtual |
Get the distance that this sound begins to fall off.
Reimplemented from AudioSound.
Definition at line 759 of file openalAudioSound.cxx.
|
virtual |
Returns whether the sound has been marked "active".
Implements AudioSound.
Definition at line 863 of file openalAudioSound.cxx.
|
virtual |
-1.0 to 1.0 scale -1 should be all the way left.
1 is all the way to the right.
Implements AudioSound.
Definition at line 636 of file openalAudioSound.cxx.
|
virtual |
Returns whether looping is on or off.
Implements AudioSound.
Definition at line 264 of file openalAudioSound.cxx.
|
virtual |
Return how many times a sound will loop.
Implements AudioSound.
Definition at line 290 of file openalAudioSound.cxx.
|
virtual |
|
virtual |
Gets the play position within the sound.
Implements AudioSound.
Definition at line 562 of file openalAudioSound.cxx.
|
virtual |
Gets the current volume of a sound.
1 is Max. O is Min.
Implements AudioSound.
Definition at line 614 of file openalAudioSound.cxx.
|
virtual |
|
virtual |
Plays a sound.
Implements AudioSound.
Definition at line 131 of file openalAudioSound.cxx.
References get_3d_attributes(), TrueClock::get_global_ptr(), set_3d_attributes(), set_3d_drop_off_factor(), set_3d_max_distance(), set_3d_min_distance(), set_volume(), and stop().
Referenced by set_active().
|
virtual |
Set position and velocity of this sound.
Both Panda3D and OpenAL use a right handed coordinate system. However, in Panda3D the Y-Axis is going into the Screen and the Z-Axis is going up. In OpenAL the Y-Axis is going up and the Z-Axis is coming out of the screen.
The solution is simple, we just flip the Y and Z axis and negate the Z, as we move coordinates from Panda to OpenAL and back.
Reimplemented from AudioSound.
Definition at line 694 of file openalAudioSound.cxx.
Referenced by play().
void OpenALAudioSound::set_3d_drop_off_factor | ( | PN_stdfloat | factor | ) |
Control the effect distance has on audability.
Defaults to 1.0
Definition at line 799 of file openalAudioSound.cxx.
Referenced by play().
|
virtual |
Set the distance that this sound stops falling off.
Reimplemented from AudioSound.
Definition at line 769 of file openalAudioSound.cxx.
Referenced by play().
|
virtual |
Set the distance that this sound begins to fall off.
Also affects the rate it falls off.
Reimplemented from AudioSound.
Definition at line 740 of file openalAudioSound.cxx.
Referenced by play().
|
virtual |
Sets whether the sound is marked "active".
By default, the active flag true for all sounds. If the active flag is set to false for any particular sound, the sound will not be heard.
Implements AudioSound.
Definition at line 832 of file openalAudioSound.cxx.
|
virtual |
|
virtual |
Turns looping on and off.
Implements AudioSound.
Definition at line 253 of file openalAudioSound.cxx.
|
virtual |
Sets the speed at which a sound plays back.
The rate is a multiple of the sound, normal playback speed. IE 2 would play back 2 times fast, 3 would play 3 times, and so on.
Implements AudioSound.
Definition at line 649 of file openalAudioSound.cxx.
|
virtual |
The next time you call play, the sound will start from the specified offset.
Implements AudioSound.
Definition at line 551 of file openalAudioSound.cxx.
|
virtual |
0.0 to 1.0 scale of volume converted to Fmod's internal 0.0 to 255.0 scale.
Implements AudioSound.
Definition at line 595 of file openalAudioSound.cxx.
Referenced by play().
|
virtual |
Get status of the sound.
This returns the status as of the last push_fresh_buffers
Implements AudioSound.
Definition at line 906 of file openalAudioSound.cxx.
Referenced by set_active().
|
virtual |
Stop a sound.
Implements AudioSound.
Definition at line 206 of file openalAudioSound.cxx.
Referenced by play(), and set_active().