001package jmri.jmrit.audio;
002
003import javax.vecmath.Vector3f;
004import org.slf4j.Logger;
005import org.slf4j.LoggerFactory;
006
007/**
008 * Null implementation of the Audio Listener sub-class.
009 * <p>
010 * For now, no system-specific implementations are forseen - this will remain
011 * internal-only
012 *
013 * <hr>
014 * This file is part of JMRI.
015 * <p>
016 * JMRI is free software; you can redistribute it and/or modify it under the
017 * terms of version 2 of the GNU General Public License as published by the Free
018 * Software Foundation. See the "COPYING" file for a copy of this license.
019 * <p>
020 * JMRI is distributed in the hope that it will be useful, but WITHOUT ANY
021 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
022 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
023 *
024 * @author Matthew Harris copyright (c) 2009
025 */
026public class NullAudioListener extends AbstractAudioListener {
027
028    /**
029     * Constructor for new NullAudioListener with system name
030     *
031     * @param systemName AudioListener object system name (e.g. IAL)
032     */
033    public NullAudioListener(String systemName) {
034        super(systemName);
035        if (log.isDebugEnabled()) {
036            log.debug("New NullAudioListener: {}", systemName);
037        }
038    }
039
040    /**
041     * Constructor for new NullAudioListener with system name and user name
042     *
043     * @param systemName AudioListener object system name (e.g. IAL)
044     * @param userName   AudioListener object user name
045     */
046    public NullAudioListener(String systemName, String userName) {
047        super(systemName, userName);
048        if (log.isDebugEnabled()) {
049            log.debug("New NullAudioListener: {} ({})", userName, systemName);
050        }
051    }
052
053    @Override
054    protected void changePosition(Vector3f pos) {
055        // Do nothing
056    }
057
058    @Override
059    protected void cleanup() {
060        if (log.isDebugEnabled()) {
061            log.debug("Cleanup NullAudioBuffer ({})", this.getSystemName());
062        }
063    }
064
065    private static final Logger log = LoggerFactory.getLogger(NullAudioListener.class);
066
067}