From 8d703e9737c22440e877564402111bac738607dd Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 4 Dec 2022 11:32:02 -0800 Subject: [PATCH] Fix compile errors on Linux. --- src/musikcubed/main.cpp | 10 ---------- src/plugins/pipewireout/PipeWireOut.cpp | 10 +++++----- src/plugins/pulseout/PulseOut.cpp | 1 + 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/musikcubed/main.cpp b/src/musikcubed/main.cpp index a6acdfb24..4f1ac7855 100644 --- a/src/musikcubed/main.cpp +++ b/src/musikcubed/main.cpp @@ -21,9 +21,6 @@ #include #include -#include -#include - #include "../musikcore/version.h" using namespace musik; @@ -264,12 +261,6 @@ static void initForeground() { }); } -static void initUtf8() { - std::locale locale = std::locale(); - std::locale utf8Locale(locale, new boost::filesystem::detail::utf8_codecvt_facet); - boost::filesystem::path::imbue(utf8Locale); -} - static void rescanHandler(int signal) { debug::info("daemon", "received SIGUSR1, rescanning the library..."); auto library = LibraryFactory::Instance().DefaultLocalLibrary(); @@ -277,7 +268,6 @@ static void rescanHandler(int signal) { } int main(int argc, char** argv) { - initUtf8(); std::cout << "\n using lockfile at: " << getLockfileFn(); handleCommandLine(argc, argv); exitIfRunning(); diff --git a/src/plugins/pipewireout/PipeWireOut.cpp b/src/plugins/pipewireout/PipeWireOut.cpp index b5089fd5e..ddfdf63fd 100644 --- a/src/plugins/pipewireout/PipeWireOut.cpp +++ b/src/plugins/pipewireout/PipeWireOut.cpp @@ -85,7 +85,7 @@ static std::string getDeviceId() { } void PipeWireOut::OnStreamStateChanged(void* data, enum pw_stream_state old, enum pw_stream_state state, const char* error) { - ::debug->Info(TAG, str::format("state changed from %d to %d. (%s)", old, state, error ? error : "no additional context").c_str()); + ::debug->Info(TAG, str::Format("state changed from %d to %d. (%s)", old, state, error ? error : "no additional context").c_str()); } void PipeWireOut::OnCoreDone(void* userdata, uint32_t id, int seq) { @@ -119,7 +119,7 @@ void PipeWireOut::OnRegistryGlobal(void *userdata, uint32_t id, uint32_t permiss } pw_properties_free(dict); } - ::debug->Info(TAG, str::format("detected PipeWire:Interface:Device with id=%d", id).c_str()); + ::debug->Info(TAG, str::Format("detected PipeWire:Interface:Device with id=%d", id).c_str()); context->instance->deviceList.Add(std::to_string(id), formattedName); } } @@ -337,7 +337,7 @@ bool PipeWireOut::StartPipeWire(IBuffer* buffer) { int result; if ((result = pw_thread_loop_start(this->pwThreadLoop)) != 0) { - ::debug->Error(TAG, str::format("error starting thread loop: %s", spa_strerror(result)).c_str()); + ::debug->Error(TAG, str::Format("error starting thread loop: %s", spa_strerror(result)).c_str()); goto cleanup; }; @@ -371,7 +371,7 @@ bool PipeWireOut::StartPipeWire(IBuffer* buffer) { params[0] = spa_format_audio_raw_build(&builder, SPA_PARAM_EnumFormat, &audioInfo); if (!params[0]) { - ::debug->Error(TAG, str::format( + ::debug->Error(TAG, str::Format( "failed to create audio format. channels=%d, rate=%d", this->channelCount, this->sampleRate).c_str()); @@ -408,7 +408,7 @@ bool PipeWireOut::StartPipeWire(IBuffer* buffer) { return true; } else { - ::debug->Error(TAG, str::format( + ::debug->Error(TAG, str::Format( "error starting stream: %s", spa_strerror(result)).c_str()); } diff --git a/src/plugins/pulseout/PulseOut.cpp b/src/plugins/pulseout/PulseOut.cpp index 10d21148d..dea0716e2 100755 --- a/src/plugins/pulseout/PulseOut.cpp +++ b/src/plugins/pulseout/PulseOut.cpp @@ -39,6 +39,7 @@ #include #include #include +#include using namespace musik::core::sdk;