diff options
Diffstat (limited to 'src/crepe/api')
| -rw-r--r-- | src/crepe/api/AudioSource.cpp | 1 | ||||
| -rw-r--r-- | src/crepe/api/AudioSource.h | 2 | ||||
| -rw-r--r-- | src/crepe/api/Config.h | 25 | 
3 files changed, 23 insertions, 5 deletions
diff --git a/src/crepe/api/AudioSource.cpp b/src/crepe/api/AudioSource.cpp index 4baac9a..c646aeb 100644 --- a/src/crepe/api/AudioSource.cpp +++ b/src/crepe/api/AudioSource.cpp @@ -15,6 +15,5 @@ void AudioSource::play(bool looping) {  void AudioSource::stop() {  	this->playing = false; -	this->rewind = true;  } diff --git a/src/crepe/api/AudioSource.h b/src/crepe/api/AudioSource.h index 9d76f0b..8dc1645 100644 --- a/src/crepe/api/AudioSource.h +++ b/src/crepe/api/AudioSource.h @@ -44,8 +44,6 @@ private:  	//! If this source is playing audio  	bool playing = false; -	//! Rewind the sample location -	bool rewind = false;  private:  	//! AudioSystem::ComponentPrivate diff --git a/src/crepe/api/Config.h b/src/crepe/api/Config.h index 693400a..7be506e 100644 --- a/src/crepe/api/Config.h +++ b/src/crepe/api/Config.h @@ -1,8 +1,10 @@  #pragma once +#include <string> +  #include "../util/Log.h" +  #include "types.h" -#include <string>  namespace crepe { @@ -18,7 +20,20 @@ struct Config final {  	static Config & get_instance();  	//! Logging-related settings -	Log::Config log; +	struct { +		/** +		 * \brief Log level +		 * +		 * Only messages with equal or higher priority than this value will be logged. +		 */ +		Log::Level level = Log::Level::INFO; +		/** +		 * \brief Colored log output +		 * +		 * Enables log coloring using ANSI escape codes. +		 */ +		bool color = true; +	} log;  	//! Save manager  	struct { @@ -62,6 +77,12 @@ struct Config final {  		 */  		std::string root_pattern = ".crepe-root";  	} asset; + +	//! Audio system settings +	struct { +		//! Max amount of simultanious voices +		unsigned int voices = 32; +	} audio;  };  } // namespace crepe  |