#ifdef ENABLE_AUDIO

#include "LZSoundData.h"

#include "LZArchive.h"

#include <string.h>


LZMusic::~LZMusic() {
}

bool LZMusic::load(const TCHAR *namearc, const TCHAR *namemod) {

    LZArchive lza;
    if (lza.open(namearc) == false)
        return false;

    LZItem lzi;
    if (lza.read(namemod, &lzi) == false)
        return false;

    lzi.decompress();

    return (hssMusic::load((void*)lzi.dBuffer(), /*lzi.dSize(),*/ true) == HSS_OK);
}


LZSound::~LZSound() {
}

bool LZSound::load(const TCHAR *namearc, const TCHAR *namesnd) {

    LZArchive lza;
    if (lza.open(namearc) == false)
        return false;

    LZItem lzi;
    if (lza.read(namesnd, &lzi) == false)
        return false;

    lzi.decompress();

    return (hssSound::load((void*)lzi.dBuffer(), /*lzi.dSize(),*/ true) == HSS_OK);
}


#endif
