From 90a2ec2b18d7d3a36fa3106c4d063b1048d8d98e Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 28 May 2018 22:57:57 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BB=E5=8F=96wav=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/audio/sdl/source.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/libjin/audio/sdl/source.h') diff --git a/src/libjin/audio/sdl/source.h b/src/libjin/audio/sdl/source.h index 29a3676..900568f 100644 --- a/src/libjin/audio/sdl/source.h +++ b/src/libjin/audio/sdl/source.h @@ -13,22 +13,18 @@ namespace jin namespace audio { - struct SDLSourceCommand; + typedef struct SDLSourceCommand; class SDLSource : public Source { public: - enum Type - { - WAV = 1, - OGG = 2, - }; - - SDLSource(Type format, void* mem, int size) ; ~SDLSource(); + static SDLSource* createSource(SourceType format, const char* file); + static SDLSource* createSource(SourceType format, void* mem, size_t size); + /* ISource interface */ void play() override; void stop() override; @@ -45,6 +41,8 @@ namespace audio private: + SDLSource(); + friend class SDLSourceManager; void loadWAV(void* mem, int size); -- cgit v1.1-26-g67d0