From 5560448bb78ed865aeb77f62cf85a2aed302779d Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 29 Jul 2018 12:16:17 +0800 Subject: *update --- src/libjin/Audio/SDL/SDLSource.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'src/libjin/Audio/SDL/SDLSource.h') 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 commands; + std::stack commandsPool; + std::vector sources; // processing sources static SDLSourceManager* manager; - static std::queue commands; - static std::stack commandsPool; - static std::vector sources; // processing sources - }; class SourceException : public std::exception -- cgit v1.1-26-g67d0