jmri.jmrit.audio
Class NullAudioFactory

java.lang.Object
  extended by jmri.jmrit.audio.AbstractAudioFactory
      extended by jmri.jmrit.audio.NullAudioFactory
All Implemented Interfaces:
AudioFactory

public class NullAudioFactory
extends AbstractAudioFactory

This is the null audio system specific AudioFactory. It is a dummy factory which provides the necessary object generation but does not produce any sound. This will normally only be used when running on a system that has no sound-card installed.


This file is part of JMRI.

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.

Author:
Matthew Harris copyright (c) 2009

Constructor Summary
NullAudioFactory()
           
 
Method Summary
 void cleanup()
          Perform any implementation specific clean-up operations.
 AudioBuffer createNewBuffer(String systemName, String userName)
          Provide a specific new AudioBuffer object.
 AudioListener createNewListener(String systemName, String userName)
          Provide a specific new AudioListener object.
 AudioSource createNewSource(String systemName, String userName)
          Provide a specific new AudioSource object.
 AudioListener getActiveAudioListener()
          Return the currently active Listener object
 boolean init()
          Perform any implementation specific initialisation routines.
 String toString()
           
 
Methods inherited from class jmri.jmrit.audio.AbstractAudioFactory
audioCommandQueue, getCommandThread, isDistanceAttenuated, setDistanceAttenuated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullAudioFactory

public NullAudioFactory()
Method Detail

init

public boolean init()
Description copied from interface: AudioFactory
Perform any implementation specific initialisation routines.

Specified by:
init in interface AudioFactory
Overrides:
init in class AbstractAudioFactory
Returns:
true, if initialisation successful

toString

public String toString()
Overrides:
toString in class Object

cleanup

public void cleanup()
Description copied from interface: AudioFactory
Perform any implementation specific clean-up operations.

Specified by:
cleanup in interface AudioFactory
Overrides:
cleanup in class AbstractAudioFactory

createNewBuffer

public AudioBuffer createNewBuffer(String systemName,
                                   String userName)
Description copied from interface: AudioFactory
Provide a specific new AudioBuffer object.

Parameters:
systemName - for this object instance
userName - for this object instance
Returns:
a new specific AudioBuffer

createNewListener

public AudioListener createNewListener(String systemName,
                                       String userName)
Description copied from interface: AudioFactory
Provide a specific new AudioListener object.

Parameters:
systemName - for this object instance
userName - for this object instance
Returns:
a new specific AudioListener

getActiveAudioListener

public AudioListener getActiveAudioListener()
Description copied from interface: AudioFactory
Return the currently active Listener object

Returns:
active AudioListener

createNewSource

public AudioSource createNewSource(String systemName,
                                   String userName)
Description copied from interface: AudioFactory
Provide a specific new AudioSource object.

Parameters:
systemName - for this object instance
userName - for this object instance
Returns:
a new specific AudioSource


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads