diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-01-06 11:54:03 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-01-06 11:54:03 +0100 |
commit | 78e5bc8e9a6588eaa4d95be18e28175706a2c06c (patch) | |
tree | e81d87cb80eef580dbcd2818010f23cd9bb686a5 /scene | |
parent | 9849df94388baf46c38cd8608004caf88e4af386 (diff) | |
parent | 53b2b0ccbe058cbf1e90699020535ae785f27964 (diff) |
Merge pull request #3211 from SaracenOne/audio_stream_pause_fix
Fix delay on audio stream pause
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/spatial_stream_player.cpp | 2 | ||||
-rw-r--r-- | scene/audio/stream_player.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp index 048c9e78ac..dfef0faf4b 100644 --- a/scene/3d/spatial_stream_player.cpp +++ b/scene/3d/spatial_stream_player.cpp @@ -60,7 +60,7 @@ void SpatialStreamPlayer::sp_set_mix_rate(int p_rate){ bool SpatialStreamPlayer::sp_mix(int32_t *p_buffer,int p_frames) { - if (resampler.is_ready()) { + if (resampler.is_ready() && !paused) { return resampler.mix(p_buffer,p_frames); } diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index 0180ed4a1d..f7cfc31b03 100644 --- a/scene/audio/stream_player.cpp +++ b/scene/audio/stream_player.cpp @@ -58,7 +58,7 @@ void StreamPlayer::sp_set_mix_rate(int p_rate){ bool StreamPlayer::sp_mix(int32_t *p_buffer,int p_frames) { - if (resampler.is_ready()) { + if (resampler.is_ready() && !paused) { return resampler.mix(p_buffer,p_frames); } |