audio

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package audio handles all audio playback. It uses the beep library to play audio files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAudio

func InitAudio()

InitAudio initializes the audio system. Loads all audio files from the assets/audio folder.

func Play

func Play(key string, volumeModifier ...float64)

Play plays a sound effect. If the sound effect is not loaded, nothing will happen.

func PlayMusic

func PlayMusic(key string)

PlayMusic plays a music track. If the music track is not loaded, nothing will happen.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL