Package soundPlayback
Class ClipPlayback
java.lang.Object
soundPlayback.ClipPlayback
Some static functions to playback sound clips.
Should eventually amalgamate this a bit with the main SoundPlayback module
used by the viewer!
- Author:
- doug
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ClipPlaybackGet the singleton clip playback object.booleanIs it currently playingbooleanplayClip(double[][] clipData, float sampleRate, boolean autoScale) Play one or two channels of audio data back through the default sound card.booleanStop any currently active clip.
-
Method Details
-
getInstance
Get the singleton clip playback object.- Returns:
- clip playback class.
-
isPlaying
public boolean isPlaying()Is it currently playing- Returns:
-
stopPlayback
public boolean stopPlayback()Stop any currently active clip.- Returns:
-
playClip
public boolean playClip(double[][] clipData, float sampleRate, boolean autoScale) Play one or two channels of audio data back through the default sound card. no control over speed, i.e. doesn't use playback speed controls (could change this ? )
Will stop playback of any currently playing clips first.- Parameters:
clipData- one or two channels of audio data.sampleRate- playback sample rateautoScale- if true, will autoscale the data to full range of system (i.e. max val will be 32767).- Returns:
- true if played OK, false otherwise.
-