early-access version 2950
This commit is contained in:
@@ -133,10 +133,10 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
paused = false;
|
||||
if (cubeb_stream_start(stream_backend) != CUBEB_OK) {
|
||||
LOG_CRITICAL(Audio_Sink, "Error starting cubeb stream");
|
||||
}
|
||||
paused = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,12 +149,10 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
paused = true;
|
||||
if (cubeb_stream_stop(stream_backend) != CUBEB_OK) {
|
||||
LOG_CRITICAL(Audio_Sink, "Error stopping cubeb stream");
|
||||
}
|
||||
|
||||
was_playing.store(!paused);
|
||||
paused = true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -112,8 +112,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_PauseAudioDevice(device, 0);
|
||||
paused = false;
|
||||
SDL_PauseAudioDevice(device, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,8 +124,8 @@ public:
|
||||
if (device == 0 || paused) {
|
||||
return;
|
||||
}
|
||||
SDL_PauseAudioDevice(device, 1);
|
||||
paused = true;
|
||||
SDL_PauseAudioDevice(device, 1);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -220,8 +220,6 @@ protected:
|
||||
u32 device_channels{2};
|
||||
/// Is this stream currently paused?
|
||||
std::atomic<bool> paused{true};
|
||||
/// Was this stream previously playing?
|
||||
std::atomic<bool> was_playing{false};
|
||||
/// Name of this stream
|
||||
std::string name{};
|
||||
|
||||
|
Reference in New Issue
Block a user