diff options
author | chai <chaifix@163.com> | 2018-07-28 00:50:12 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-28 00:50:12 +0800 |
commit | 92dab582ccac31be7fa410e7f4fb3789e88a0629 (patch) | |
tree | 008bbecc76a73aae38d77d1851f4230756356a33 /src/libjin/audio/sdl/audio.h | |
parent | b855ebb91ad8d97617ec1aa418b4add84670a07d (diff) |
*update
Diffstat (limited to 'src/libjin/audio/sdl/audio.h')
-rw-r--r-- | src/libjin/audio/sdl/audio.h | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/libjin/audio/sdl/audio.h b/src/libjin/audio/sdl/audio.h deleted file mode 100644 index 6da6605..0000000 --- a/src/libjin/audio/sdl/audio.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __JIN_AUDIO_SDL_H -#define __JIN_AUDIO_SDL_H -#include "../../modules.h" -#if JIN_MODULES_AUDIO && JIN_AUDIO_SDLAUDIO - -#include <vector> -#include "../audio.h" - -namespace jin -{ -namespace audio -{ - -#define SDLAUDIO_BITDEPTH 16 -#define SDLAUDIO_BYTEDEPTH (SDLAUDIO_BITDEPTH >> 3) -#define SDLAUDIO_CHANNELS 2 - - class SDLAudio : public AudioSystem<SDLAudio> - { - - public: - - struct Setting : SettingBase - { - public: - int samplerate; // Ƶ - int samples; // sample<=samplerate - }; - - /* IAudio interface */ - void play() override; - void stop() override; - bool pause() override; - bool pause(Source* source) override; - bool resume() override; - bool resume(Source* source) override; - void rewind() override; - void setVolume(float volume) override; - float getVolume() override; - - /* process functions*/ - void processCommands(); - void processSources(void* buffer, size_t len); - - void lock(); - void unlock(); - - private: - - SDLAudio() {}; - ~SDLAudio() {}; - - SINGLETON(SDLAudio); - - onlyonce bool initSystem(const SettingBase* setting) override; - onlyonce void quitSystem() override; - - unsigned int audioDevice; - - }; - - typedef SDLAudio::Setting SDLAudioSetting; - -} -} - -#endif // JIN_MODULES_AUDIO && JIN_AUDIO_SDLAUDIO -#endif
\ No newline at end of file |