You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Please enter the commit message for your changes. Lines starting
removed locks
This commit is contained in:
@@ -67,7 +67,7 @@ bool StreamPlayer::sp_mix(int32_t *p_buffer,int p_frames) {
|
|||||||
|
|
||||||
void StreamPlayer::sp_update() {
|
void StreamPlayer::sp_update() {
|
||||||
|
|
||||||
_THREAD_SAFE_METHOD_
|
//_THREAD_SAFE_METHOD_
|
||||||
if (!paused && resampler.is_ready() && playback.is_valid()) {
|
if (!paused && resampler.is_ready() && playback.is_valid()) {
|
||||||
|
|
||||||
if (!playback->is_playing()) {
|
if (!playback->is_playing()) {
|
||||||
@@ -144,7 +144,7 @@ void StreamPlayer::play(float p_from_offset) {
|
|||||||
if (playback->is_playing())
|
if (playback->is_playing())
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
_THREAD_SAFE_METHOD_
|
//_THREAD_SAFE_METHOD_
|
||||||
playback->play(p_from_offset);
|
playback->play(p_from_offset);
|
||||||
//feed the ringbuffer as long as no update callback is going on
|
//feed the ringbuffer as long as no update callback is going on
|
||||||
sp_update();
|
sp_update();
|
||||||
@@ -162,7 +162,7 @@ void StreamPlayer::stop() {
|
|||||||
if (playback.is_null())
|
if (playback.is_null())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_THREAD_SAFE_METHOD_
|
//_THREAD_SAFE_METHOD_
|
||||||
AudioServer::get_singleton()->stream_set_active(stream_rid,false);
|
AudioServer::get_singleton()->stream_set_active(stream_rid,false);
|
||||||
playback->stop();
|
playback->stop();
|
||||||
//set_idle_process(false);
|
//set_idle_process(false);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class StreamPlayer : public Node {
|
|||||||
|
|
||||||
OBJ_TYPE(StreamPlayer,Node);
|
OBJ_TYPE(StreamPlayer,Node);
|
||||||
|
|
||||||
_THREAD_SAFE_CLASS_
|
//_THREAD_SAFE_CLASS_
|
||||||
|
|
||||||
struct InternalStream : public AudioServer::AudioStream {
|
struct InternalStream : public AudioServer::AudioStream {
|
||||||
StreamPlayer *player;
|
StreamPlayer *player;
|
||||||
|
|||||||
Reference in New Issue
Block a user