|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AudioBuffer
Represent an AudioBuffer, a place to store or control sound information.
The AbstractAudio class contains a basic implementation of the state and messaging code, and forms a useful start for a system-specific implementation. Specific implementations in the jmrix package, e.g. for LocoNet and NCE, will convert to and from the layout commands.
The states and names are Java Bean parameters, so that listeners can be registered to be notified of any changes.
Each AudioBuffer object has a two names. The "user" name is entirely free form, and can be used for any purpose. The "system" name is provided by the system-specific implementations, and provides a unique mapping to the layout control system (e.g. LocoNet, NCE, etc) and address within that system.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary | |
|---|---|
static int |
FORMAT_16BIT_5DOT1
Definition of 16-bit 5.1 multi-channel audio format. |
static int |
FORMAT_16BIT_6DOT1
Definition of 16-bit 6.1 multi-channel audio format. |
static int |
FORMAT_16BIT_7DOT1
Definition of 16-bit 7.1 multi-channel audio format. |
static int |
FORMAT_16BIT_MONO
Definition of 16-bit mono audio format |
static int |
FORMAT_16BIT_QUAD
Definition of 16-bit quad multi-channel audio format. |
static int |
FORMAT_16BIT_STEREO
Definition of 16-bit stereo audio format |
static int |
FORMAT_8BIT_5DOT1
Definition of 8-bit 5.1 multi-channel audio format. |
static int |
FORMAT_8BIT_6DOT1
Definition of 8-bit 6.1 multi-channel audio format. |
static int |
FORMAT_8BIT_7DOT1
Definition of 8-bit 7.1 multi-channel audio format. |
static int |
FORMAT_8BIT_MONO
Definition of 8-bit mono audio format |
static int |
FORMAT_8BIT_QUAD
Definition of 8-bit quad multi-channel audio format. |
static int |
FORMAT_8BIT_STEREO
Definition of 8-bit stereo audio format |
static int |
FORMAT_UNKNOWN
Definition of unknown audio format |
| Fields inherited from interface jmri.Audio |
|---|
AT, BUFFER, CMD_BIND_BUFFER, CMD_FADE_IN, CMD_FADE_OUT, CMD_INIT_FACTORY, CMD_LOAD_SOUND, CMD_PAUSE, CMD_PAUSE_TOGGLE, CMD_PLAY, CMD_PLAY_TOGGLE, CMD_RESET_POSITION, CMD_RESUME, CMD_REWIND, CMD_STOP, DECIMAL_PLACES, FADE_IN, FADE_NONE, FADE_OUT, LISTENER, MAX_DISTANCE, SOURCE, STATE_EMPTY, STATE_INITIAL, STATE_LOADED, STATE_MOVING, STATE_PLAYING, STATE_POSITIONED, STATE_STOPPED, UP |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Method Summary | |
|---|---|
long |
getEndLoopPoint()
Retrieves the end loop point of the sound sample stored in this buffer Applies only to sub-types: Buffer |
int |
getFormat()
Retrieves the format of the sound sample stored in this buffer Applies only to sub-types: Buffer |
int |
getFrameSize()
Retrieves the length of a sound sample frame stored in this buffer Applies only to sub-types: Buffer |
int |
getFrequency()
Retrieves the frequency of the sound sample stored in this buffer Applies only to sub-types: Buffer |
long |
getLength()
Retrieves the length of the sound sample stored in this buffer Applies only to sub-types: Buffer |
long |
getStartLoopPoint()
Retrieves the start loop point of the sound sample stored in this buffer Applies only to sub-types: Buffer |
String |
getURL()
Return the url of the sound sample Applies only to sub-types: Buffer |
boolean |
isStreamed()
Retrieves the current streaming setting of this buffer Applies only to sub-types: Buffer |
boolean |
isStreamedForced()
Determines if this buffer can be loaded in full or if it must be streamed from the file. |
void |
setEndLoopPoint(long endLoopPoint)
Sets the end loop point of the sound sample stored in this buffer Applies only to sub-types: Buffer |
void |
setInputStream(InputStream stream)
Sets the input stream of the sound sample Applies only to sub-types: Buffer |
void |
setStartLoopPoint(long startLoopPoint)
Sets the start loop point of the sound sample stored in this buffer Applies only to sub-types: Buffer |
void |
setStreamed(boolean streamed)
Sets that this buffer is to be streamed as opposed to loaded in full. |
void |
setURL(String pUrl)
Sets the url of the sound sample Applies only to sub-types: Buffer |
| Methods inherited from interface jmri.Audio |
|---|
getSubType, stateChanged |
| Field Detail |
|---|
static final int FORMAT_UNKNOWN
static final int FORMAT_8BIT_MONO
static final int FORMAT_16BIT_MONO
static final int FORMAT_8BIT_STEREO
static final int FORMAT_16BIT_STEREO
static final int FORMAT_8BIT_QUAD
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_16BIT_QUAD
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_8BIT_5DOT1
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_16BIT_5DOT1
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_8BIT_6DOT1
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_16BIT_6DOT1
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_8BIT_7DOT1
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
static final int FORMAT_16BIT_7DOT1
These formats are only supported by certain OpenAL implementations and support is determined at runtime.
JavaSound and Null implementations do not support these formats.
| Method Detail |
|---|
String getURL()
Applies only to sub-types:
void setURL(String pUrl)
Applies only to sub-types:
pUrl - URL for location containing sound sample datavoid setInputStream(InputStream stream)
Applies only to sub-types:
stream - InputStream containing sound sample dataint getFormat()
Applies only to sub-types:
long getLength()
Applies only to sub-types:
getFrameSize()int getFrequency()
Applies only to sub-types:
int getFrameSize()
Applies only to sub-types:
void setStartLoopPoint(long startLoopPoint)
Applies only to sub-types:
startLoopPoint - position of start loop point in sampleslong getStartLoopPoint()
Applies only to sub-types:
void setEndLoopPoint(long endLoopPoint)
Applies only to sub-types:
endLoopPoint - position of end loop point in sampleslong getEndLoopPoint()
Applies only to sub-types:
void setStreamed(boolean streamed)
isStreamedForced is not set.
Applies only to sub-types:
streamed - buffer is streamed from file or loaded in fullisStreamedForced()boolean isStreamed()
Applies only to sub-types:
boolean isStreamedForced()
Applies only to sub-types:
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||