PlaybackSettings (src/audio.rs)

bevy · crates/bevy_audio/src/audio.rs · rust · Apache-2.0
voice

Defines audio playback settings and modes for Bevy audio, including spatial and looping options.

// Source: https://github.com/bevyengine/bevy | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
use crate::{AudioSource, Decodable, Volume};
use bevy_asset::{Asset, Handle};
use bevy_ecs::prelude::*;
use bevy_math::Vec3;
use bevy_reflect::prelude::*;
use bevy_transform::components::Transform;

/// The way Bevy manages the sound playback.
#[derive(Debug, Clone, Copy, Reflect)]
#[reflect(Clone)]
pub enum PlaybackMode {
    /// Play the sound once. Do nothing when it ends.
    ///
    /// Note: It is not possible to reuse an [`AudioPlayer`] after it has finished playing and
    /// the underlying [`AudioSink`](crate::AudioSink) or [`SpatialAudioSink`](crate::SpatialAudioSink) has been drained.
    ///
    /// To replay a sound, the audio components provide

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key