diff --git a/Source/IconMenu.cpp b/Source/IconMenu.cpp index 22177cb..268d277 100644 --- a/Source/IconMenu.cpp +++ b/Source/IconMenu.cpp @@ -228,25 +228,25 @@ void IconMenu::changeListenerCallback(ChangeBroadcaster* changed) void IconMenu::dumpDeviceInfo() { - logger.logMessage ("--------------------------------------"); - logger.logMessage ("Current audio device type: " + (deviceManager.getCurrentDeviceTypeObject() != nullptr + logger->logMessage("--------------------------------------"); + logger->logMessage("Current audio device type: " + (deviceManager.getCurrentDeviceTypeObject() != nullptr ? deviceManager.getCurrentDeviceTypeObject()->getTypeName() : "")); if (auto* device = deviceManager.getCurrentAudioDevice()) { - logger.logMessage ("Current audio device: " + device->getName().quoted()); - logger.logMessage ("Sample rate: " + String (device->getCurrentSampleRate()) + " Hz"); - logger.logMessage ("Block size: " + String (device->getCurrentBufferSizeSamples()) + " samples"); - logger.logMessage ("Bit depth: " + String (device->getCurrentBitDepth())); - logger.logMessage ("Input channel names: " + device->getInputChannelNames().joinIntoString (", ")); - logger.logMessage ("Active input channels: " + getListOfActiveBits (device->getActiveInputChannels())); - logger.logMessage ("Output channel names: " + device->getOutputChannelNames().joinIntoString (", ")); - logger.logMessage ("Active output channels: " + getListOfActiveBits (device->getActiveOutputChannels())); + logger->logMessage("Current audio device: " + device->getName().quoted()); + logger->logMessage("Sample rate: " + String (device->getCurrentSampleRate()) + " Hz"); + logger->logMessage("Block size: " + String (device->getCurrentBufferSizeSamples()) + " samples"); + logger->logMessage("Bit depth: " + String (device->getCurrentBitDepth())); + logger->logMessage("Input channel names: " + device->getInputChannelNames().joinIntoString (", ")); + // logger->logMessage("Active input channels: " + getListOfActiveBits (device->getActiveInputChannels())); + logger->logMessage("Output channel names: " + device->getOutputChannelNames().joinIntoString (", ")); + // logger->logMessage("Active output channels: " + getListOfActiveBits (device->getActiveOutputChannels())); } else { - logger.logMessage ("No audio device open"); + logger->logMessage("No audio device open"); } } diff --git a/Source/IconMenu.hpp b/Source/IconMenu.hpp index bc69c99..98ffa7d 100644 --- a/Source/IconMenu.hpp +++ b/Source/IconMenu.hpp @@ -36,8 +36,9 @@ class IconMenu : public SystemTrayIconComponent, private Timer, public ChangeLis void removePluginsLackingInputOutput(); std::vector getTimeSortedList(); void setIcon(); - - std::unique_ptr logger = FileLogger::createDefaultAppLogger("", "app.log", "LightHost logfile"); + void dumpDeviceInfo(); + + FileLogger* logger = FileLogger::createDefaultAppLogger("", "app.log", "LightHost logfile"); AudioDeviceManager deviceManager; AudioPluginFormatManager formatManager; KnownPluginList knownPluginList;