From 55b34e05b3d735a84e1af9833e19c0b816c18252 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 30 Jun 2015 11:28:43 -0300 Subject: -some changes by okam --- drivers/speex/audio_stream_speex.cpp | 2 +- drivers/unix/os_unix.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/speex/audio_stream_speex.cpp b/drivers/speex/audio_stream_speex.cpp index a6bac78b4d..bcf4c515f8 100644 --- a/drivers/speex/audio_stream_speex.cpp +++ b/drivers/speex/audio_stream_speex.cpp @@ -21,7 +21,7 @@ void AudioStreamSpeex::update() { //printf("update, loops %i, read ofs %i\n", (int)loops, read_ofs); //printf("playing %i, paused %i\n", (int)playing, (int)paused); - if (!playing || paused || !data.size()) + if (!active || !playing || paused || !data.size()) return; /* diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 8ba56490d7..f6d9e0fb4e 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -57,8 +57,14 @@ #include #include #include "globals.h" + +extern bool _print_error_enabled; + void OS_Unix::print_error(const char* p_function,const char* p_file,int p_line,const char *p_code,const char*p_rationale,ErrorType p_type) { + if (!_print_error_enabled) + return; + if (p_rationale && p_rationale[0]) { print("\E[1;31;40mERROR: %s: \E[1;37;40m%s\n",p_function,p_rationale); -- cgit v1.2.3