Class AudioPlayer

java.lang.Object
uno.anahata.ai.media.util.AudioPlayer

public final class AudioPlayer extends Object
A simple UI utility to play short, non-blocking notification sounds from resources. All playback is handled on a dedicated 'audio-player' thread pool.
  • Method Details

    • playSound

      public static void playSound(String resourceName)
      Plays a short, non-blocking notification sound from the application's resources.

      The sound file is expected to be located in the /sounds/ directory within the classpath. Playback is handled on a dedicated background thread and will be skipped if the microphone is currently active.

      Parameters:
      resourceName - The simple name of the sound file to play (e.g., "idle.wav").