Skip to content

Commit

Permalink
I press buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
koteq committed Aug 25, 2024
1 parent 188b8ab commit 9798c8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
22 changes: 11 additions & 11 deletions Source/IconMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
: "<none>"));

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");
}
}

Expand Down
5 changes: 3 additions & 2 deletions Source/IconMenu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ class IconMenu : public SystemTrayIconComponent, private Timer, public ChangeLis
void removePluginsLackingInputOutput();
std::vector<PluginDescription> getTimeSortedList();
void setIcon();

std::unique_ptr<FileLogger> logger = FileLogger::createDefaultAppLogger("", "app.log", "LightHost logfile");
void dumpDeviceInfo();

FileLogger* logger = FileLogger::createDefaultAppLogger("", "app.log", "LightHost logfile");
AudioDeviceManager deviceManager;
AudioPluginFormatManager formatManager;
KnownPluginList knownPluginList;
Expand Down

0 comments on commit 9798c8e

Please sign in to comment.