| Modifier and Type | Field and Description |
|---|---|
| private Locator | |
| private AtomicInteger | |
| private URI |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public AudioClip | append(AudioClip clip)
Implements abstract com. Create a new AudioClip by appending the given clip to the current clip. |
| public static AudioClip | create(byte[] data, int dataOffset, int sampleCount, int sampleFormat, int channels, int sampleRate)
Hides com. Generate a AudioClip from raw LPCM audio data. |
| public AudioClip | createSegment(double startTime, double stopTime)
Implements abstract com. Create a new AudioClip from a segment of an existing AudioClip. |
| public AudioClip | createSegment(int startSample, int endSample)
Implements abstract com. Create a new AudioClip from a segment of an existing AudioClip. |
| public AudioClip | flatten()
Implements abstract com. Creates a completely independent AudioClip. |
| pack-priv Locator | |
| public boolean | isPlaying()
Implements abstract com. Test if any AudioClipPlayer has this AudioClip in its effect chain. |
| public static AudioClip | load(URI source)
Hides com. Load an audio clip from the specified source URI. |
| public void | play()
Implements abstract com. Play this AudioClip with the default parameters. |
| public void | play(double volume)
Implements abstract com. Play this AudioClip at the given volume level. |
| public void | play(double volume, double balance, double rate, double pan, int loopCount, int priority)
Implements abstract com. Play this AudioClip at the given volume level and relative pitch. |
| pack-priv void | |
| public AudioClip | resample(int startSample, int endSample, int newSampleRate)
Implements abstract com. Create a new AudioClip from an existing clip by resampling a segment of the source clip to the specified sample playbackRate. |
| public void | stop()
Implements abstract com. Stops all playback of this AudioClip. |
| public static void | stopAllClips()
Hides com. Stop all AudioClips that are currently playing. |
| mediaLocator | back to summary |
|---|---|
| private Locator mediaLocator | |
| playCount | back to summary |
|---|---|
| private AtomicInteger playCount | |
| sourceURI | back to summary |
|---|---|
| private URI sourceURI | |
| NativeMediaAudioClip | back to summary |
|---|---|
| private NativeMediaAudioClip(URI source) throws URISyntaxException, FileNotFoundException, IOException | |
| append | back to summary |
|---|---|
| public AudioClip append(AudioClip clip) throws IOException Implements abstract com. Doc from com. Create a new AudioClip by appending the given clip to the current clip. The new clip is independent of the two source clips. If the sample rates are mismatched, the new clip will contain at least one resampled copy of a source clip. Which clip is resampled is implementation dependent.
| |
| create | back to summary |
|---|---|
| public static AudioClip create(byte[] data, int dataOffset, int sampleCount, int sampleFormat, int channels, int sampleRate) Hides com. Doc from com. Generate a AudioClip from raw LPCM audio data. This can be used to programmatically create sound effects, either generated mathematically or loaded from some arbitrary source. Multiple channels must be interleaved properly, for stereo audio left channel is always first. | |
| createSegment | back to summary |
|---|---|
| public AudioClip createSegment(double startTime, double stopTime) throws IllegalArgumentException Implements abstract com. Doc from com. Create a new AudioClip from a segment of an existing AudioClip. The new clip may copy or simply reference this existing clip, so be aware that this operation may have a severe memory usage impact for long segments. The default parameters are copied to the new clip. This variant specifies the start and end times of the segment. Specifying an end time beyond the duration of the clip will crop the new AudioClip to the end of the source clip. Specifying a start time less than zero or greater than end time is undefined and will return null.
| |
| createSegment | back to summary |
|---|---|
| public AudioClip createSegment(int startSample, int endSample) throws IllegalArgumentException Implements abstract com. Doc from com. Create a new AudioClip from a segment of an existing AudioClip. The new clip may copy or simply reference this existing clip, so be aware that this operation may have a severe memory usage impact for long segments. The default parameters are copied to the new clip. This variant specifies the exact sample offsets of the segment, starting at sample zero. If endSample is greater than the number of samples in the source clip, it will be cropped to the last sample. Specifying a start sample less than zero or higher than endSample is undefined and will return null.
| |
| flatten | back to summary |
|---|---|
| public AudioClip flatten() Implements abstract com. Doc from com. Creates a completely independent AudioClip. Any references contained will be copied and the references removed. The result will be a single AudioEffect containing all the audio data required to produce the effect. If the effect is already independent, then this will simply return the same AudioClip.
| |
| getLocator | back to summary |
|---|---|
| pack-priv Locator getLocator() | |
| isPlaying | back to summary |
|---|---|
| public boolean isPlaying() Implements abstract com. Doc from com. Test if any AudioClipPlayer has this AudioClip in its effect chain.
| |
| load | back to summary |
|---|---|
| public static AudioClip load(URI source) throws URISyntaxException, FileNotFoundException, IOException Hides com. Doc from com. Load an audio clip from the specified source URI. Currently supported formats are AIFF and WAV files. Audio data in the file must be raw PCM, loading compressed files is not supported at this time.
| |
| play | back to summary |
|---|---|
| public void play() Implements abstract com. Doc from com. Play this AudioClip with the default parameters. This is a fire and forget method, the clip will play exactly once using the default parameters.
| |
| play | back to summary |
|---|---|
| public void play(double volume) Implements abstract com. Doc from com. Play this AudioClip at the given volume level. This is a fire and forget method, the clip will play exactly once using the given volume and default pitch and pan.
| |
| play | back to summary |
|---|---|
| public void play(double volume, double balance, double rate, double pan, int loopCount, int priority) Implements abstract com. Doc from com. Play this AudioClip at the given volume level and relative pitch. This is a fire and forget method, the clip will play exactly once using the given parameters.
| |
| playFinished | back to summary |
|---|---|
| pack-priv void playFinished() | |
| resample | back to summary |
|---|---|
| public AudioClip resample(int startSample, int endSample, int newSampleRate) throws IllegalArgumentException, IOException Implements abstract com. Doc from com. Create a new AudioClip from an existing clip by resampling a segment of the source clip to the specified sample playbackRate.
| |
| stop | back to summary |
|---|---|
| public void stop() Implements abstract com. Doc from com. Stops all playback of this AudioClip.
| |
| stopAllClips | back to summary |
|---|---|
| public static void stopAllClips() Hides com. Doc from com. Stop all AudioClips that are currently playing. | |