CMAudio/inc/hgl/audio/AudioManage.h

47 lines
1.0 KiB
C
Raw Permalink Normal View History

2020-06-18 03:38:48 +08:00
#ifndef HGL_AUDIO_MANAGE_INCLUDE
#define HGL_AUDIO_MANAGE_INCLUDE
#include<hgl/type/List.h>
namespace hgl
{
class AudioSource;
class AudioBuffer;
/**
*
*/
class AudioManage
{
struct AudioItem
{
AudioSource *source;
AudioBuffer *buffer;
AudioItem();
~AudioItem();
bool Check();
void Play(const os_char *,float);
};//struct AudioItem
ObjectList<AudioItem> Items;
public:
/**
*
* @param count ,8
*/
AudioManage(int count=8);
~AudioManage();
/**
*
* @param filename
* @param gain 1
*/
bool Play(const os_char *filename,float gain=1);
};//class AudioManage
}//namespace hgl
#endif//HGL_AUDIO_MANAGE_INCLUDEE