diff options
author | chai <chaifix@163.com> | 2018-05-28 22:57:57 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-05-28 22:57:57 +0800 |
commit | 90a2ec2b18d7d3a36fa3106c4d063b1048d8d98e (patch) | |
tree | 42d04c0fd9bc843d9d0e54b347a00cd03533de14 /src/libjin/audio/sdl/source.h | |
parent | aa9393254a8a9deec3db5b17539a9be273965b07 (diff) |
修改读取wav错误
Diffstat (limited to 'src/libjin/audio/sdl/source.h')
-rw-r--r-- | src/libjin/audio/sdl/source.h | 14 |
1 files changed, 6 insertions, 8 deletions
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); |