AudioSound

class AudioSound

Bases: TypedReferenceCount

Inheritance diagram

digraph inheritance494108b9f1 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AudioSound" [URL="acron.core.AudioSound.html#acron.core.AudioSound",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "TypedReferenceCount" -> "AudioSound" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }
enum SoundStatus
enumerator BAD = 0
enumerator READY = 1
enumerator PLAYING = 2
AudioSound.configure_filters()
static AudioSound.get_3d_attributes()
AudioSound.get_3d_cone_inner_angle()
AudioSound.get_3d_cone_outer_angle()
AudioSound.get_3d_cone_outer_gain()
AudioSound.get_3d_direction()
AudioSound.get_3d_max_distance()
AudioSound.get_3d_min_distance()
AudioSound.get_active()
AudioSound.get_balance()
static AudioSound.get_class_type()
AudioSound.get_comment()
AudioSound.get_finished_event()
AudioSound.get_loop()
AudioSound.get_loop_count()
AudioSound.get_loop_start()
AudioSound.get_name()

There is no set_name(), this is intentional.

There is no set_name(), this is intentional.

AudioSound.get_num_raw_comments()
AudioSound.get_play_rate()
AudioSound.get_priority()
AudioSound.get_raw_comment()
AudioSound.get_speaker_mix()

speaker_mix is for use with FMOD.

AudioSound.get_time()
AudioSound.get_volume()
AudioSound.has_comment()
AudioSound.is_positional()

Returns true if this was created as a positional sound.

AudioSound.length()

return: playing time in seconds.

AudioSound.make_copy()

Construct a near-identical copy of this object on the heap and return a pointer to the new copy. Currently only implemented for OpenAL.

AudioSound.output()
AudioSound.play()

For best compatibility, 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).

AudioSound.set_3d_attributes()

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).

AudioSound.set_3d_cone_inner_angle()

Sets the angle of the inner cone of a directional sound source. In the zone inside of the inner cone sound is emitted with the (normal) volume set by set_volume().

AudioSound.set_3d_cone_outer_angle()

Sets the angle of the outer cone of a directional sound source. In the zone between the inner and the outer cone the volume is attenuated.

AudioSound.set_3d_cone_outer_gain()

Sets a factor applied to the volume set by set_volume() for the zone outside the outer cone. By default this is 0 (so no sound is heard inside the outer zone).

AudioSound.set_3d_direction()

Controls the direction of this sound emitter. Currently implemented only for OpenAL.

AudioSound.set_3d_max_distance()

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

AudioSound.set_3d_min_distance()

Controls the distance (in units) that this sound begins to fall off. Also affects the rate it falls off. Default is 1.0 CloserFaster, <1.0 FartherSlower, >1.0

AudioSound.set_active()

inits to manager’s state.

inits to manager’s state.

AudioSound.set_balance()

-1.0 is hard left 0.0 is centered 1.0 is hard right inits to 0.0.

-1.0 is hard left 0.0 is centered 1.0 is hard right inits to 0.0.

AudioSound.set_finished_event()

Set (or clear) the event that will be thrown when the sound finishes playing. To clear the event, pass an empty string.

AudioSound.set_loop()

loop: false = play once; true = play forever. inits to false.

AudioSound.set_loop_count()

loop_count: 0 = forever; 1 = play once; n = play n times. inits to 1.

AudioSound.set_loop_start()

loop_start: 0 = beginning. expressed in seconds. inits to 0.

AudioSound.set_play_rate()

play_rate is any positive PN_stdfloat value. inits to 1.0.

play_rate is any positive PN_stdfloat value. inits to 1.0.

AudioSound.set_priority()
AudioSound.set_speaker_mix()
AudioSound.set_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.

In the past, this call did nothing if the sound was currently playing, and it was necessary to call play() to effect the change. This is no longer the case; the time change takes effect immediately.

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

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.

In the past, this call did nothing if the sound was currently playing, and it was necessary to call play() to effect the change. This is no longer the case; the time change takes effect immediately.

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();
AudioSound.set_volume()

0 = minimum; 1.0 = maximum. inits to 1.0.

0 = minimum; 1.0 = maximum. inits to 1.0.

AudioSound.status()
AudioSound.stop()
AudioSound.write()