diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-12-21 10:25:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-21 10:25:46 -0300 |
commit | 49a19f85b8c49b891cdc2fdfaebce5e176c9b0c3 (patch) | |
tree | 37abb6111adabcd4ceb7b72a9f84fa78da3898cf /scene | |
parent | 15429d6ac95acb044c9eebd64356f33e7e5d14ef (diff) |
-different attempt to avod deadlock problem
Diffstat (limited to 'scene')
-rw-r--r-- | scene/audio/stream_player.cpp | 6 | ||||
-rw-r--r-- | scene/audio/stream_player.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index 004c20bc35..4cfca0492a 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,6 +143,8 @@ 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(); @@ -160,8 +162,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 b5aa943067..be090f50e1 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; |