This class provides an interface to play audio streams.
To play an audio stream use:
AudioPlayer.player.start(audiostream);
To stop playing an audio stream use:
AudioPlayer.player.stop(audiostream);
To play an audio stream from a URL use:
AudioStream audiostream = new AudioStream(url.openStream());
AudioPlayer.player.start(audiostream);
To play a continuous sound you first have to
create an AudioData instance and use it to construct a
ContinuousAudioDataStream.
For example:
AudoData data = new AudioStream(url.openStream()).getData();
ContinuousAudioDataStream audiostream = new ContinuousAudioDataStream(data);
AudioPlayer.player.stop(audiostream);
See Also: AudioData See Also: AudioDataStream See Also: AudioDevice See Also: AudioStream author: Arthur van Hoff, Thomas Ball version: 1.37, 08/19/02 |