diff options
author | chai <chaifix@163.com> | 2018-07-29 12:16:17 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-29 12:16:17 +0800 |
commit | 5560448bb78ed865aeb77f62cf85a2aed302779d (patch) | |
tree | 0381def6419d98b9cbf950db21cbe38d555c5688 /src/libjin/Audio/SDL/SDLSource.h | |
parent | e9dcb75fb3cdbabd7152b0303af4dc27b4bcca3d (diff) |
*update
Diffstat (limited to 'src/libjin/Audio/SDL/SDLSource.h')
-rw-r--r-- | src/libjin/Audio/SDL/SDLSource.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/libjin/Audio/SDL/SDLSource.h b/src/libjin/Audio/SDL/SDLSource.h index 5c6aefc..9a3dd9b 100644 --- a/src/libjin/Audio/SDL/SDLSource.h +++ b/src/libjin/Audio/SDL/SDLSource.h @@ -72,7 +72,7 @@ namespace audio int pitch; // pitch int state; // ǰ״̬ bool loop; // loop or not - int volume; // + float volume; // } status; }; @@ -85,20 +85,22 @@ namespace audio static SDLSourceManager* get(); /* Process function */ - static void processCommands(); - static void processSources(void* buffer, size_t size); - - static void removeSource(SDLSource* source); - static void pushSource(SDLSource* source); - static SDLSourceCommand* getCommand(); - static void pushCommand(SDLSourceCommand* cmd); - + void processCommands(); + void processSources(void* buffer, size_t size); + + void removeAllSource(); + void removeSource(SDLSource* source); + void pushSource(SDLSource* source); + SDLSourceCommand* getCommand(); + void pushCommand(SDLSourceCommand* cmd); + + private : + + std::queue<SDLSourceCommand*> commands; + std::stack<SDLSourceCommand*> commandsPool; + std::vector<SDLSource*> sources; // processing sources static SDLSourceManager* manager; - static std::queue<SDLSourceCommand*> commands; - static std::stack<SDLSourceCommand*> commandsPool; - static std::vector<SDLSource*> sources; // processing sources - }; class SourceException : public std::exception |