summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/convex_decomp/b2Glue.h3
-rw-r--r--drivers/convex_decomp/b2Polygon.h2
-rw-r--r--platform/javascript/audio_server_javascript.cpp11
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/convex_decomp/b2Glue.h b/drivers/convex_decomp/b2Glue.h
index db765f7eb9..7ec6d7f181 100644
--- a/drivers/convex_decomp/b2Glue.h
+++ b/drivers/convex_decomp/b2Glue.h
@@ -20,7 +20,8 @@
#define B2GLUE_H
#include "math_2d.h"
-#include <limits>
+#include <limits.h>
+
namespace b2ConvexDecomp {
typedef real_t float32;
diff --git a/drivers/convex_decomp/b2Polygon.h b/drivers/convex_decomp/b2Polygon.h
index 82cdc56804..36af2fd9d0 100644
--- a/drivers/convex_decomp/b2Polygon.h
+++ b/drivers/convex_decomp/b2Polygon.h
@@ -22,7 +22,7 @@
#include "b2Triangle.h"
#include "stdio.h"
#include <string.h>
-#include <limits>
+#include <limits.h>
namespace b2ConvexDecomp {
static bool B2_POLYGON_REPORT_ERRORS = false;
diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp
index 8fa76d5aee..fd505b8a8f 100644
--- a/platform/javascript/audio_server_javascript.cpp
+++ b/platform/javascript/audio_server_javascript.cpp
@@ -626,11 +626,14 @@ void AudioServerJavascript::finish(){
}
void AudioServerJavascript::update(){
- for(List<Stream*>::Element *E=active_audio_streams.front();E;E=E->next()) {
+ for(List<Stream*>::Element *E=active_audio_streams.front();E;) { //stream might be removed durnig this callback
+
+ List<Stream*>::Element *N=E->next();
- if (E->get()->audio_stream ) {
+ if (E->get()->audio_stream)
E->get()->audio_stream->update();
- }
+
+ E=N;
}
}
@@ -653,7 +656,7 @@ int AudioServerJavascript::get_default_mix_rate() const{
void AudioServerJavascript::set_stream_global_volume_scale(float p_volume){
-
+ stream_volume_scale=p_volume;
}
void AudioServerJavascript::set_fx_global_volume_scale(float p_volume){