|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractAudio
jmri.jmrit.audio.AbstractAudioBuffer
jmri.jmrit.audio.NullAudioBuffer
public class NullAudioBuffer
Null implementation of the Audio Buffer sub-class.
For now, no system-specific implementations are forseen - this will remain internal-only
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 |
|---|
| Fields inherited from class jmri.jmrit.audio.AbstractAudioBuffer |
|---|
LOOP_POINT_BOTH, LOOP_POINT_END, LOOP_POINT_START |
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.jmrit.audio.AudioBuffer |
|---|
FORMAT_16BIT_5DOT1, FORMAT_16BIT_6DOT1, FORMAT_16BIT_7DOT1, FORMAT_16BIT_MONO, FORMAT_16BIT_QUAD, FORMAT_16BIT_STEREO, FORMAT_8BIT_5DOT1, FORMAT_8BIT_6DOT1, FORMAT_8BIT_7DOT1, FORMAT_8BIT_MONO, FORMAT_8BIT_QUAD, FORMAT_8BIT_STEREO, FORMAT_UNKNOWN |
| 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 |
| Constructor Summary | |
|---|---|
NullAudioBuffer(String systemName)
Constructor for new NullAudioBuffer with system name |
|
NullAudioBuffer(String systemName,
String userName)
Constructor for new NullAudioBuffer with system name and user name |
|
| Method Summary | |
|---|---|
protected void |
cleanUp()
Abstract method that concrete classes will implement to perform necessary cleanup routines. |
protected void |
generateLoopBuffers(int which)
Method used to generate any necessary loop buffers. |
protected boolean |
generateStreamingBuffers()
Internal method used to generate buffers for streaming |
int |
getFormat()
Retrieves the format of the sound sample 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 |
protected boolean |
loadBuffer()
Method used to load the actual sound data into the buffer |
protected boolean |
loadBuffer(InputStream stream)
Method used to load the actual sound data from an InputStream into the buffer |
protected void |
removeStreamingBuffers()
Internal method used to remove streaming buffers |
String |
toString()
|
| Methods inherited from class jmri.jmrit.audio.AbstractAudioBuffer |
|---|
getEndLoopPoint, getFrameSize, getStartLoopPoint, getSubType, getURL, isStreamed, isStreamedForced, setEndLoopPoint, setEndLoopPoint, setInputStream, setStartLoopPoint, setStartLoopPoint, setStreamed, setStreamedForced, setURL, stateChanged |
| Methods inherited from class jmri.implementation.AbstractAudio |
|---|
getState, roundDecimal, roundDecimal, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NullAudioBuffer(String systemName)
systemName - AudioBuffer object system name (e.g. IAB4)
public NullAudioBuffer(String systemName,
String userName)
systemName - AudioBuffer object system name (e.g. IAB4)userName - AudioBuffer object user name| Method Detail |
|---|
public String toString()
toString in class AbstractAudioprotected boolean loadBuffer(InputStream stream)
AbstractAudioBuffer
loadBuffer in class AbstractAudioBufferstream - InputStream containing sound data
protected boolean loadBuffer()
AbstractAudioBuffer
loadBuffer in class AbstractAudioBufferprotected void generateLoopBuffers(int which)
AbstractAudioBuffer
generateLoopBuffers in class AbstractAudioBufferwhich - the loop buffer to generate:
AbstractAudioBuffer.LOOP_POINT_START for the start loop buffer
AbstractAudioBuffer.LOOP_POINT_END for the end loop buffer
AbstractAudioBuffer.LOOP_POINT_BOTH for both loop buffersprotected boolean generateStreamingBuffers()
AbstractAudioBuffer
generateStreamingBuffers in class AbstractAudioBufferprotected void removeStreamingBuffers()
AbstractAudioBuffer
removeStreamingBuffers in class AbstractAudioBufferpublic int getFormat()
AudioBufferApplies only to sub-types:
public long getLength()
AudioBufferApplies only to sub-types:
AudioBuffer.getFrameSize()public int getFrequency()
AudioBufferApplies only to sub-types:
protected void cleanUp()
AbstractAudio
cleanUp in class AbstractAudio
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||