Guard against null debug during shutdown.

This commit is contained in:
casey langen 2021-03-21 14:58:18 -07:00
parent f416a1dbd7
commit 56f3af3b96
3 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,9 @@ if [ $OS == "Linux" ]; then
DISTRO=`lsb_release -cs`
echo "detected ${DISTRO}"
case $DISTRO in
"hirsute")
sudo apt-get install build-essential clang cmake libboost-thread1.71-dev libboost-system1.71-dev libboost-filesystem1.71-dev libboost-date-time1.71-dev libboost-atomic1.71-dev libboost-chrono1.71-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncurses-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libtag1-dev libsystemd-dev libavcodec-extra libopenmpt-dev libssl-dev libspa-0.2-dev libpipewire-0.3-dev pipewire pipewire-bin pipewire-audio-client-libraries
;;
"focal" | "groovy")
sudo apt-get install build-essential clang cmake libboost-thread1.71-dev libboost-system1.71-dev libboost-filesystem1.71-dev libboost-date-time1.71-dev libboost-atomic1.71-dev libboost-chrono1.71-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncurses-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libtag1-dev libsystemd-dev libavcodec-extra libopenmpt-dev libssl-dev
;;

View File

@ -289,7 +289,7 @@ IDevice* PipeWireOut::GetDefaultDevice() {
}
void PipeWireOut::StopPipeWire() {
::debug->Info(TAG, "shutdown started");
if (::debug) ::debug->Info(TAG, "shutdown started");
this->Stop();
@ -317,7 +317,7 @@ void PipeWireOut::StopPipeWire() {
this->channelCount = 0;
this->sampleRate = 0;
::debug->Info(TAG, "shutdown complete");
if (::debug) ::debug->Info(TAG, "shutdown complete");
}
bool PipeWireOut::StartPipeWire(IBuffer* buffer) {

View File

@ -288,7 +288,7 @@ class PipeWireOut : public IOutput {
std::condition_variable_any bufferCondition, drainCondition;
double volume{1.0};
pw_stream_events pwStreamEvents;
pw_thread_loop* pwThreadLoop {nullptr};
pw_thread_loop* pwThreadLoop{nullptr};
pw_stream* pwStream{nullptr};
OutBufferContext outBufferContext;
long channelCount{0};