#include "CDAudioSound.h"



//----------------------------------------------------------------//
//	Constructor/Deconstructor
//----------------------------------------------------------------//	

CDAudioSound::CDAudioSound()
{
	m_Segment = NULL;	


}

CDAudioSound::~CDAudioSound()
{


}

bool CDAudioSound::Init(STRINGC fileName)
{
	CoInitialize(NULL);
	CoCreateInstance(CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC, IID_IDirectMusicSegment8, (void**) &m_Segment);		

	m_fileName = fileName;
	
	return true;
}

void CDAudioSound::downloadPerformance(IDirectMusicPerformance8* performance)
{
	m_Segment->Download(performance);
}


bool CDAudioSound::Shutdown()
{

	m_Segment->Release();
	return true;
}












