///////////////////////////////////////////////////////////////////////////////
//
// File      : Asura_PS3_NullSound.h
// Author    : Philip Hall
// Created   : 11/09/2007
//
// Copyright (C) 2007 Rebellion. All Rights Reserved
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __ASURA_PS3_NULLSOUND_H__
#define __ASURA_PS3_NULLSOUND_H__

#ifndef ASURA_USE_AUDIO_SYSTEM

#if defined(ASURA_PS3_USE_NULLSOUND) && (ASURA_PS3_USE_NULLSOUND != 0)

// Asura headers
#include "Sound/Asura_Sound.h"


////////////////////////////////////////////
// PS3 NULL Active sound implementation
////////////////////////////////////////////
class Asura_PS3_ActiveNullSound : public Asura_PS3_ActiveSound_Common
{
public:
	bool Create(int iLoadedSoundIndex, Asura_Handle iPlayingSoundHandle, bool bUseEQ, bool bUse3d) { return true; }
	void Destroy()					{ }
	void Update()					{ }

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

	// Basic behaviour
	bool Play( bool bLooping )		{ return false; }
	bool Pause()					{ return false; }
	bool Unpause()					{ return false; }
	bool Stop( int iDecayMS )	    { return false; }

	// More advanced control
	bool SetUseReverb( bool bUseReverb )						{ return true; }
	bool SetEQType(Asura_Sound_System::EQType eType) { return true; }
	bool SetCone( const Asura_Vector_3& xDirection, float fInnerAngle, float fOuterAngle, float fVolumeOutsideCone ) { return false; }

	bool IsValid() const { return (m_iLoadedSoundIndex >= 0); }
};


////PGH/////////////////////////////////////////
// PS3 NULL streaming sound
////////////////////////////////////////////////
class Asura_PS3_NullSound_Streaming
{
public:
	Asura_PS3_NullSound_Streaming() { }

	bool Initialise() { return true; }
	void Shutdown() {} 
	void Update() { }
	void Reset() { }
		
	bool Create( int iStreamID, const char* szFilename, Asura_Sound_System::SoundGroup eSoundGroup ) { return false; }
	void Play( int iStreamID, bool bLooping, bool bPreload ) { };
	void Stop( int iStreamID ) { };
	void Release( int iStreamID ) { };
	void Pause( int iStreamID ) { };
	void Resume( int iStreamID ) { };
	void SetVolume( int iStreamID, float fVol ) { };
	bool IsFinished( int iStreamID ) { return false; };
	float GetPosition( int iStreamID ) { return 0.0f; };
	float GetLength( int iStreamID ) { return 0.0f; };
	void SetPosition( int iStreamID, float fTime ) { };
	bool IsSoundReady( int iStreamID ) { return true; }

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

	ASURA_DECLARE_NO_COPYING(Asura_PS3_NullSound_Streaming)
};


////////////////////////////////////////////
// PS3 NULL sound implementation
////////////////////////////////////////////
class Asura_PS3_NullSound
{
	static const int ASURA_PS3_SOUND_MAX_MONO_VOICES = 4;
	static const int ASURA_PS3_SOUND_MAX_STEREO_VOICES = 1;

public:
	Asura_PS3_NullSound()	{ }

	bool Initialise()		{ return true; }
	void Update()			{ }
	void Reset()			{ }
	bool Shutdown()			{ return true; }

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

	void SetReverb( Asura_Sound_System::ReverbType eType, float fDryVolumeScale, float fWetVolumeScale )	{ }
	int	 GetReverbParams() const	{ return 0; }
	
	int	GetMaxConcurrentSounds() const { return ASURA_PS3_SOUND_MAX_MONO_VOICES; }
	int	GetMaxConcurrentSoundsWithEQ() const { return 0; }
	static Asura_PS3_NullSound_Streaming& GetStreamingAPI() { return s_xStreamingAPI; }

private:
	static Asura_PS3_NullSound_Streaming s_xStreamingAPI;  // Specified at top of Asura_PS3_Sound_System.cpp

	ASURA_DECLARE_NO_COPYING(Asura_PS3_NullSound);
};



#endif	// #if defined(ASURA_PS3_USE_NULLSOUND) && (ASURA_PS3_USE_NULLSOUND != 0)

#endif // #ifndef ASURA_USE_AUDIO_SYSTEM

#endif

