Java Sound Resources: Examples: Audio Playback and Recording

This page presents examples related to playback and recording of audio data. The examples utilize the package javax.sound.sampled.

SimpleAudioPlayer

Playing an audio file (easy)

SimpleAudioRecorder

Recording to an audio file (simple version)

ClipPlayer

Playing an audio file multiple times (Clip)

AudioPlayer

Playing an audio file (advanced)

AudioRecorder

Recording to an audio file (advanced version)

DecodingAudioPlayer

Playing an encoded audio file

RewindingAudioPlayer

Playing an audio file multiple times

AudioLoop

Recording and playing back the recorded data immediately