bevy-audio

Integrate and control audio playback in Bevy 0.19 apps.

125|10|Updated Nov 22, 2022
One-click install
npx skills add https://github.com/nolantait/bevy-starter --skill bevy-audio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bevy-audio
Source: https://github.com/nolantait/bevy-starter/tree/main/.agents/skills/bevy-audio
Command: npx skills add https://github.com/nolantait/bevy-starter --skill bevy-audio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bevy developers need a straightforward way to integrate and control audio playback, including spatial audio, volume management, and playback states within Bevy apps.

Core Features & Use Cases

  • AudioPlayer<Source> — component to play an audio source (requires PlaybackSettings)
  • AudioSink — component added automatically; controls playback on that entity
  • Pitch — asset for generating simple tones

Quick Start

Instantiate an AudioPlayer with a loaded Source and apply PlaybackSettings to begin playback in your Bevy app.

Frequently Asked Questions about bevy-audio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I play audio in a Bevy game?

To play audio in a Bevy game, instantiate an AudioPlayer component with a loaded audio Source and apply PlaybackSettings to begin playback. The AudioSink component is automatically added to control playback state on that entity.

What is spatial audio and how do I enable it in Bevy?

Spatial audio in Bevy provides position-based sound simulation for games. You enable it by adding optional spatial audio plugins and configuring global volume management alongside your AudioPlayer components.

Does this audio playback approach work with Bevy 0.19?

Yes, this audio playback approach explicitly works with Bevy 0.19. It supports volume control, playback state management, and spatial audio plugins designed for games and simulations built with the Bevy 0.19 framework.

How can I generate simple tones programmatically in Bevy?

You can generate simple tones programmatically in Bevy using the Pitch asset. Once created, the Pitch asset is passed to an AudioPlayer component with PlaybackSettings to play the generated tone.

How do I manage volume and playback states in a Bevy simulation?

You manage volume and playback states in a Bevy simulation using the AudioSink component for state control and global volume management features. PlaybackSettings applied during AudioPlayer instantiation dictate initial playback behavior.