summaryrefslogtreecommitdiff
path: root/scene/audio
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-21 09:05:49 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-21 09:05:49 -0300
commit81f62fb78c7f3c133ef764a99dcdf05077d8ced9 (patch)
tree88787e15447a8a3831f9064bde8949bc62a765b5 /scene/audio
parent93a6ec1e32df7f8f6156f728fe3f82a69ee126ca (diff)
-Fix to progress dialog, speding it up
-Fix potential deadlock in stream player -Fix collada to support broken files from ColladaMaya
Diffstat (limited to 'scene/audio')
-rw-r--r--scene/audio/stream_player.cpp6
-rw-r--r--scene/audio/stream_player.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp
index 4cfca0492a..004c20bc35 100644
--- a/scene/audio/stream_player.cpp
+++ b/scene/audio/stream_player.cpp
@@ -67,7 +67,7 @@ bool StreamPlayer::sp_mix(int32_t *p_buffer,int p_frames) {
void StreamPlayer::sp_update() {
- //_THREAD_SAFE_METHOD_
+ _THREAD_SAFE_METHOD_
if (!paused && resampler.is_ready() && playback.is_valid()) {
if (!playback->is_playing()) {
@@ -143,8 +143,6 @@ void StreamPlayer::play(float p_from_offset) {
return;
//if (is_playing())
stop();
-
- //_THREAD_SAFE_METHOD_
playback->play(p_from_offset);
//feed the ringbuffer as long as no update callback is going on
sp_update();
@@ -162,8 +160,8 @@ void StreamPlayer::stop() {
if (playback.is_null())
return;
- //_THREAD_SAFE_METHOD_
AudioServer::get_singleton()->stream_set_active(stream_rid,false);
+ _THREAD_SAFE_METHOD_
playback->stop();
resampler.flush();
diff --git a/scene/audio/stream_player.h b/scene/audio/stream_player.h
index be090f50e1..b5aa943067 100644
--- a/scene/audio/stream_player.h
+++ b/scene/audio/stream_player.h
@@ -37,7 +37,7 @@ class StreamPlayer : public Node {
OBJ_TYPE(StreamPlayer,Node);
- //_THREAD_SAFE_CLASS_
+ _THREAD_SAFE_CLASS_
struct InternalStream : public AudioServer::AudioStream {
StreamPlayer *player;