| 107 | #endif |
| 108 | |
| 109 | IAudioService* initAudioService() { |
| 110 | // Prepare audio subsystem |
| 111 | IAudioService* service; |
| 112 | |
| 113 | Log::information("============ Initializing audio service ============"); |
| 114 | #ifdef USE_PULSEAUDIO |
| 115 | Log::information("Compiled with PulseAudio support."); |
| 116 | Log::information("This application flavor does not support PipeWire or its PulseAudio compatibility mode."); |
| 117 | Log::information("If you want to use this application with PipeWire, you need to recompile this app with proper support enabled."); |
| 118 | Log::information("Refer to the README for more detailed information."); |
| 119 | Log::information(""); |
| 120 | service = new PulseAudioService(); |
| 121 | #else |
| 122 | Log::information("Compiled with PipeWire support."); |
| 123 | Log::information("This application flavor does not support PulseAudio."); |
| 124 | Log::information("If you want to use this application with PulseAudio, you need to recompile this app with proper support enabled."); |
| 125 | Log::information("Refer to the README for more detailed information."); |
| 126 | Log::information(""); |
| 127 | Log::debug("Blocklisted apps: " + AppConfig::instance().get<QString>(AppConfig::AudioAppBlocklist) /* explicitly use as QString here */); |
| 128 | Log::debug("Blocklist mode: " + QString((AppConfig::instance().get<bool>(AppConfig::AudioAppBlocklistInvert) ? "allow" : "block"))); |
| 129 | service = new PipewireAudioService(); |
| 130 | #endif |
| 131 | QObject::connect(service, &IAudioService::logOutputReceived, [](const QString& msg){ Log::kernel(msg); }); |
| 132 | QObject::connect(&DspConfig::instance(), &DspConfig::updated, service, &IAudioService::update); |
| 133 | QObject::connect(&DspConfig::instance(), &DspConfig::updatedExternally, service, &IAudioService::update); |
| 134 | |
| 135 | return service; |
| 136 | } |
| 137 | |
| 138 | using namespace std; |
| 139 | int main(int argc, |