Skip to content

SteamAudioPlayer

stechyo edited this page Jun 11, 2024 · 4 revisions

This player's transform is used as the audio source transform in the SteamAudio simulation.

Properties

  • distance_attenuation (bool) - whether SteamAudio distance attenuation is enabled. Keep in mind that this is disabled by default, and enabling it will disable Godot's built-in attenuation, which you can only re-enable when you disable this
  • min_attenuation_distance - see IPLDistanceAttenuationModel.minDistance, and note the distance attenuation type in godot-steam-audio is always IPL_DISTANCEATTENUATIONTYPE_INVERSEDISTANCE
  • occlusion (bool) - whether SteamAudio occlusion and transmission is enabled
  • occlusion_radius (float) - see IPLSimulationInputs.occlusionRadius
  • occlusion_samples (int) - see IPLSimulationInputs.numOcclusionSamples
  • transmission_rays (int) see IPLSimulationInputs.numTransmissionRays
  • ambisonics (bool) - whether SteamAudio ambisonics is on
  • ambisonics_order (int) - see IPLAmbisonicsEncodeEffectParams.order
  • reflection (bool) - whether SteamAudio reflection is on.
  • max_reflection_distance (float) - the maximum distance from the listener at which reflection simulation is run for this audio source. Keep in mind that this does not disable reflection if it has already been simulated, it just doesn't update the effect.

Methods

  • play_stream(AudioStream stream, float from_offset, float volume_db, float pitch_scale) - plays the given stream starting at from_offset, at the defined volume and pitch scale. A very important note: play_stream is what you want to use if you'd like to change a SteamAudioPlayer's stream at runtime. Do not try to set the player's stream directly through set_stream, as that will disable all SteamAudio effects for that player. At runtime, the stream you've configured will be replaced with a SteamAudioStream. This stream has an inner stream which corresponds to what you configured in the scene.
  • get_inner_stream() - returns the player's inner AudioStream
  • get_inner_stream_playback() - returns the player's inner AudioStreamPlayback
Clone this wiki locally