zengine/include/ZE_ZMusic.h

54 lines
1.3 KiB
C
Raw Normal View History

2003-11-24 22:20:49 +00:00
/*******************************************************************************
This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002-2004 James Turk
2003-11-24 22:20:49 +00:00
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
#ifndef __ze_zmusic_h__
#define __ze_zmusic_h__
#include "ZE_ZEngine.h"
#ifdef USE_SDL_MIXER
namespace ZE
{
class ZMusic
{
protected:
ZEngine* rEngine;
Mix_Music *rMusic;
public:
static const int LoopInfinite;
2003-11-24 22:20:49 +00:00
ZMusic();
ZMusic(std::string filename);
virtual ~ZMusic();
2003-11-24 22:20:49 +00:00
void Open(std::string filename);
2003-12-24 04:43:36 +00:00
void OpenFromZRF(std::string resourceId);
2003-11-24 22:20:49 +00:00
void Release();
void Play(int loopNum=0, int fadeTime=0) const;
void Pause() const;
void Unpause() const;
void Rewind() const;
void Stop(int fadeTime=0) const;
void SetVolume(int volume);
bool IsLoaded() const;
bool IsPlaying() const;
bool IsPaused() const;
int GetVolume() const;
2003-11-24 22:20:49 +00:00
};
}
#endif //USE_SDL_MIXER
#endif //__ze_zmusic_h__