package utils
// AudioPlayer wraps oto for simple audio playback.
// The oto context is created once and reused across plays.
// NewAudioPlayer creates a new audio player with the given sample rate.
// Only one AudioPlayer should exist per process (oto allows one context).
// Play stops any current playback and starts playing the given samples.
// Samples are float64 in the range -1.0 to 1.0.
// Playback is non-blocking — audio plays in the background.
// PlayAtSpeed plays samples at the given speed (1.0 = normal, 0.5 = half speed).
// Speed change is achieved by resampling the audio.
// Playback is non-blocking — audio plays in the background.
// IsPlaying returns true if audio is currently playing.
// Stop stops any current playback.
// Close stops playback. The oto context is released by the garbage collector
// (oto v3 does not expose a context close method).