/**
*
* \file Asura_NullSound.h
*
* Copyright (C) 2007 Rebellion, All Rights Reserved.
*
* \brief
*
**/

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __ASURA_NULLSOUND_H__
#define __ASURA_NULLSOUND_H__

#include "Core/Asura.h"
#if defined(ASURA_PC_USE_NULLSOUND) && !defined(ASURA_USE_AUDIO_SYSTEM)
#include "Sound/Asura_Sound.h"

/* ------------------------------------------------------------------------- */

typedef class Asura_NullSound_ActiveSound_API		Asura_PC_ActiveSound_API;
typedef class Asura_NullSound_Sound_API				Asura_PC_Sound_API;
typedef int											Asura_PC_Sound_ReverbParams;

/* ------------------------------------------------------------------------- */

// This class must match the implicit interface of Asura_PC_ActiveSound_API
// (defined by the calls made on it). TBD an alternative would be to define
// an explicit interface class, but while logically clearer to understand,
// it introduces an additional vtable that isn't necessary.
class Asura_NullSound_ActiveSound_API
{
public:

	Asura_NullSound_ActiveSound_API()							{ }
	~Asura_NullSound_ActiveSound_API()							{ }

	bool Initialise( bool bUseHardware3dPan, u_int uSize, const WAVEFORMATEX* pxWfx, const u_char* pucData ) { return false; }
	void Update()												{ }
	void Destroy()												{ }

	bool IsValid() const										{ return false; }
	bool IsPlaying() const										{ return false; }
	bool IsPaused() const										{ return false; }

	// Basic behaviour
	bool Play( bool bIsLooping )								{ return false; }
	bool Pause()												{ return false; }
	bool Unpause( bool bIsLooping )								{ return false; }
	bool Stop()													{ return false; }

	// More advanced control
	bool SetVolume( float fVolume )								{ return false; }
	bool SetSpatial( bool bIsSpatial )							{ return false; }
	bool SetPosition( const Asura_Vector_3& xPosition )			{ return false; }
	bool SetRadii( float fInner, float fOuter )					{ return false; }
	bool SetPan( float fPan )									{ return false; }
	bool SetForcedPanAndFade( float fPan, float fFade )			{ return false; }
	bool SetPitch( float fPitch )								{ return false; }
	bool SetCone( const Asura_Vector_3&, float, float, float )  { return false; }
	bool SetUseReverb( bool bUseReverb )						{ return true; }
	bool SetUseDistanceFilter( bool bUseDistancefilter )		{ return true; }
    bool SetOcclusionLPF( float )                               { return true; }
	bool SetWetDryVolume( float, float )                        { return true; }
    void SetDistanceFilterGain (const float fGain)              { }
														
	#if _DEBUG
		void CheckStatus() const								{ }
	#endif

	// Not sure what will happen with this, may need removing.
	void SetReverbParams( const int& xReverbParams )			{ }

private:

	// Disallow copying and assignment
	Asura_NullSound_ActiveSound_API( Asura_NullSound_ActiveSound_API& other );
	const Asura_NullSound_ActiveSound_API& operator=( Asura_NullSound_ActiveSound_API& other );
};

/* ------------------------------------------------------------------------- */

// Same notes as for Asura_NullSound_ActiveSound_API
class Asura_NullSound_Sound_API
{
public:

	Asura_NullSound_Sound_API()									{ }
	~Asura_NullSound_Sound_API()								{ }

	bool Initialise()											{ return true; }
	void Update()												{ }
	void Destroy()												{ }
	bool IsValid() const										{ return true; }

	void SetListener( const Asura_Vector_3& xPosition, const Asura_Matrix_3x3& xOrientation ) { }
	void ForceListenerUpdate()									{ }

	void SetReverb( Asura_Sound_System::ReverbType eType, float fReverbAmount ) { }

	const int GetReverbParams() const							{ return 0; }
	
private:

	// Disallow copying and assignment
	Asura_NullSound_Sound_API( Asura_NullSound_Sound_API& other );
	const Asura_NullSound_Sound_API& operator=( Asura_NullSound_Sound_API& other );
};

/* ------------------------------------------------------------------------- */

#endif	//defined(ASURA_PC_USE_NULLSOUND) && !defined(ASURA_USE_AUDIO_SYSTEM)

#endif // !defined __ASURA_NULLSOUND_H__
