BAD | (SoundStatus) |
READY | (SoundStatus) |
PLAYING | (SoundStatus) |
configureFilters virtual bool AudioSound::configure_filters(FilterProperties *config); Undocumented function. |
get3dAttributes virtual void AudioSound::get_3d_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz); Undocumented function. |
get3dMaxDistance virtual float AudioSound::get_3d_max_distance(void) const; Controls the maximum distance (in units) that this sound stops falling off. The sound does not stop at that point, it just doesn't get any quieter. You should rarely need to adjust this. Default is 1000000000.0 |
get3dMinDistance virtual float AudioSound::get_3d_min_distance(void) const; Controls the distance (in units) that this sound begins to fall off. Also affects the rate it falls off. Default is 1.0 Closer/Faster, <1.0 Farther/Slower, >1.0 |
getActive virtual bool AudioSound::get_active(void) const = 0; inits to manager's state. |
getBalance virtual float AudioSound::get_balance(void) const = 0; -1.0 is hard left 0.0 is centered 1.0 is hard right inits to 0.0. |
getClassType static TypeHandle AudioSound::get_class_type(void); Undocumented function. |
getFinishedEvent virtual string const &AudioSound::get_finished_event(void) const = 0; Set (or clear) the event that will be thrown when the sound finishes playing. To clear the event, pass an empty string. |
getLoop virtual bool AudioSound::get_loop(void) const = 0; loop: false = play once; true = play forever. inits to false. |
getLoopCount virtual unsigned long int AudioSound::get_loop_count(void) const = 0; loop_count: 0 = forever; 1 = play once; n = play n times. inits to 1. |
getName virtual string const &AudioSound::get_name(void) const = 0; There is no set_name(), this is intentional. |
getPlayRate virtual float AudioSound::get_play_rate(void) const = 0; play_rate is any positive float value. inits to 1.0. |
getPriority virtual int AudioSound::get_priority(void); Undocumented function. |
getSpeakerMix virtual float AudioSound::get_speaker_mix(int speaker); Undocumented function. |
getTime virtual float AudioSound::get_time(void) const = 0; Control time position within the sound. This is similar (in concept) to the seek position within a file. time in seconds: 0 = beginning; length() = end. inits to 0.0. - 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.: float percent_complete = s.get_time() / s.length(); |
getVolume virtual float AudioSound::get_volume(void) const = 0; 0 = minimum; 1.0 = maximum. inits to 1.0. |
length virtual float AudioSound::length(void) const = 0; return: playing time in seconds. |
output virtual void AudioSound::output(ostream &out) const; Undocumented function. |
play virtual void AudioSound::play(void) = 0; For best compatability, set the loop_count, volume, and balance, prior to calling play(). You may set them while they're playing, but it's implementation specific whether you get the results. - Calling play() a second time on the same sound before it is finished will start the sound again (creating a skipping or stuttering effect). |
set3dAttributes virtual void AudioSound::set_3d_attributes(float px, float py, float pz, float vx, float vy, float vz); Controls the position of this sound's emitter. px, py and pz are the emitter's position. vx, vy and vz are the emitter's velocity in UNITS PER SECOND (default: meters). |
set3dMaxDistance virtual void AudioSound::set_3d_max_distance(float dist); Controls the maximum distance (in units) that this sound stops falling off. The sound does not stop at that point, it just doesn't get any quieter. You should rarely need to adjust this. Default is 1000000000.0 |
set3dMinDistance virtual void AudioSound::set_3d_min_distance(float dist); Controls the distance (in units) that this sound begins to fall off. Also affects the rate it falls off. Default is 1.0 Closer/Faster, <1.0 Farther/Slower, >1.0 |
setActive virtual void AudioSound::set_active(bool flag = (1)) = 0; inits to manager's state. |
setBalance virtual void AudioSound::set_balance(float balance_right = (0)) = 0; -1.0 is hard left 0.0 is centered 1.0 is hard right inits to 0.0. |
setFinishedEvent virtual void AudioSound::set_finished_event(string const &event) = 0; Set (or clear) the event that will be thrown when the sound finishes playing. To clear the event, pass an empty string. |
setLoop virtual void AudioSound::set_loop(bool loop = (1)) = 0; loop: false = play once; true = play forever. inits to false. |
setLoopCount virtual void AudioSound::set_loop_count(unsigned long int loop_count = (1)) = 0; loop_count: 0 = forever; 1 = play once; n = play n times. inits to 1. |
setPlayRate virtual void AudioSound::set_play_rate(float play_rate = (1)) = 0; play_rate is any positive float value. inits to 1.0. |
setPriority virtual void AudioSound::set_priority(int priority); Undocumented function. |
setSpeakerMix virtual void AudioSound::set_speaker_mix(float frontleft, float frontright, float center, float sub, float backleft, float backright, float sideleft, float sideright); Undocumented function. |
setTime virtual void AudioSound::set_time(float start_time = (0)) = 0; Control time position within the sound. This is similar (in concept) to the seek position within a file. time in seconds: 0 = beginning; length() = end. inits to 0.0. - 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.: float percent_complete = s.get_time() / s.length(); |
setVolume virtual void AudioSound::set_volume(float volume = (1)) = 0; 0 = minimum; 1.0 = maximum. inits to 1.0. |
status virtual AudioSound::SoundStatus AudioSound::status(void) const = 0; Undocumented function. |
stop virtual void AudioSound::stop(void) = 0; For best compatability, set the loop_count, volume, and balance, prior to calling play(). You may set them while they're playing, but it's implementation specific whether you get the results. - Calling play() a second time on the same sound before it is finished will start the sound again (creating a skipping or stuttering effect). |
write virtual void AudioSound::write(ostream &out) const; Undocumented function. |
getClassType static TypeHandle TypedReferenceCount::get_class_type(void); Undocumented function. |
getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function. |
getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type(). |
getTypeIndex int TypedObject::get_type_index(void) const; Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). |
isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly. |
isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type. |
getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function. |
getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count. |
ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. |
testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. |
testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. |
unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero. |