Class JavaSoundAudioListener

  • All Implemented Interfaces:
    java.lang.Comparable<NamedBean>, Audio, PropertyChangeProvider, AudioListener, NamedBean

    public class JavaSoundAudioListener
    extends AbstractAudioListener
    JavaSound implementation of the Audio Listener sub-class.

    For now, no system-specific implementations are forseen - this will remain internal-only

    For more information about the JavaSound API, visit http://java.sun.com/products/java-media/sound/


    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.

    • Constructor Detail

      • JavaSoundAudioListener

        public JavaSoundAudioListener​(java.lang.String systemName)
        Constructor for new JavaSoundAudioListener with system name
        Parameters:
        systemName - AudioListener object system name (e.g. IAL)
      • JavaSoundAudioListener

        public JavaSoundAudioListener​(java.lang.String systemName,
                                      java.lang.String userName)
        Constructor for new JavaSoundAudioListener with system name and user name
        Parameters:
        systemName - AudioListener object system name (e.g. IAL)
        userName - AudioListener object user name
    • Method Detail

      • setGain

        public void setGain​(float gain)
        Description copied from interface: AudioListener
        Set the gain of this AudioListener object

        Applicable values 0.0f to 1.0f

        When applied to Listeners, has the effect of altering the master gain (or volume)

        Applies only to sub-types:

        • Listener
        • Source
        Specified by:
        setGain in interface AudioListener
        Overrides:
        setGain in class AbstractAudioListener
        Parameters:
        gain - new gain value - range 0.0f to 1.0f
      • cleanup

        protected void cleanup()
        Description copied from class: AbstractAudio
        Abstract method that concrete classes will implement to perform necessary cleanup routines.

        This method is now included in dispose(). The caller can call dispose() to cleanup and deregister an audio object.

        Specified by:
        cleanup in class AbstractAudio