/*****************************************************************************
 * $LastChangedDate: 2011-04-09 21:58:06 -0400 (Sat, 09 Apr 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Sound class (NOP).
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef SOUND_SOUND_NOP_HH
#define SOUND_SOUND_NOP_HH 1

#include "base/singleton.hh"
#include "sound/sound_base.hh"
#include "sound/sound_sample.hh"
#include "sound/sound_sample_nop.hh"

namespace sound {

////////////////////////////////////////////////////////////////////////////////
/// @brief Sound class (NOP).
///
/// Class design:
/// -------------
/// See SoundBase.
///
class SoundNOP : public SoundBase, public Singleton
{
PREVENT_COPYING(SoundNOP)
private:
            SoundNOP( void ) { }
    virtual ~SoundNOP() { }

public:
                            DEFINE_GetInstance( SoundNOP )  // Singleton
    virtual bool            Enable( const bool enable = true ) { return true; }
    virtual bool            IfEnabled( void ) { return true; }
    virtual fp              GetVolume( void ) { return 1.0f; }
    virtual bool            SetVolume( const fp volume ) { return true; }
    // [SoundBase defines the other methods]

private:
    virtual shptr<Sample>   CreateSample( const Sample::Name& sampleName )
                            { return new SampleNOP(sampleName); }
private:
    DECLARE_SINGLETON_CLASS_VARS( SoundNOP )
};

#if SOUND_MODULE_CC
DEFINE_SINGLETON_CLASS_VARS( SoundNOP )
#endif

} // namespace sound

#endif // SOUND_SOUND_NOP_HH
