#include "cSoundManager.h"

cSoundManager* cSoundManager::instance_ = 0;

cSoundManager* cSoundManager::instance()
{
    if(instance_ == 0)
        instance_ = new cSoundManager;
    return instance_;
}

#ifdef WINDOWS
cSoundManager::cSoundManager()
{
    //sound setup
    Audio.Setup();
    
    movement.Setup(L"pop.wav", Audio.getPerformance(), Audio.getLoader());
    movement.setPos(0.0f, -3.0f, 0.0f);
    
    SoundEffect.Setup(L"explo1.wav", Audio.getPerformance(), Audio.getLoader());
    SoundEffect.setPos(0.0f, 0.0f, 0.0f);

    BckgrndMsc.Setup(L"music.wav", Audio.getPerformance(), Audio.getLoader());
    BckgrndMsc.setPos(0.0f, 0.0f, 0.0f);
    BckgrndMsc.Play(true);
}

void cSoundManager::playExplode()
{
    SoundEffect.Play();
}

void cSoundManager::playMoveBlock()
{
    movement.Play();
}

#endif


#ifdef MACOSX
cSoundManager::cSoundManager(){}

void cSoundManager::playExplode(){}

void cSoundManager::playMoveBlock(){}
#endif
