///////////////////////////////////////////////////////////////////////////////
/// @file DirectSound.cpp
///
/// @brief Destiny Sound System Sound Factory
///
/// @author paradoxnj
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Jan 2002
/// @author paradoxnj
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#include "DirectSound.hpp"
#include "deSound.hpp"
#include "deSound_priv.hpp"
//#include "EAX.hpp"

#include "deResource.hpp"

int deSoundData::SoundDataInterfaceID = -1;

int IdeSoundData_GetInterfaceID()
{
	return deSoundData::SoundDataInterfaceID;
}

DESOUND_API IdeSoundSystem *IdeSoundSystem_CreateDirectSound(HWND hWnd)
{
	IdeSoundSystem			*ss;

	IdeResourceManager_GetManager()->RegisterResourceType("wav", deSound_LoadWAV);
	IdeResourceManager_GetManager()->RegisterResourceType("ogg", deSound_LoadOGG);

	deSoundData::SoundDataInterfaceID = IdeResourceManager_GetManager()->GetUniqueInterfaceID();

	ss = new IdeSoundSystem_DS();
	if (!ss)
		return NULL;

	if (!ss->Initialize(hWnd))
	{
		if (ss)
			ss->Release();
		return NULL;
	}

	return (IdeSoundSystem*)ss;
}

DESOUND_API IdeSoundSystem *IdeSoundSystem_CreateEAX(HWND hWnd)
{
#pragma todo (implement this)
	//Return NULL for now
	hWnd = NULL; // warning 4100, unused formal param
	return NULL;
}
