mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
Qt: Add audio dumping options
This commit is contained in:
parent
c4af353d54
commit
fe2e6561d3
|
@ -12,6 +12,7 @@ AudioSettingsWidget::AudioSettingsWidget(QtHostInterface* host_interface, QWidge
|
||||||
SettingWidgetBinder::BindWidgetToEnumSetting(m_host_interface, m_ui.audioBackend, "Audio/Backend",
|
SettingWidgetBinder::BindWidgetToEnumSetting(m_host_interface, m_ui.audioBackend, "Audio/Backend",
|
||||||
&Settings::ParseAudioBackend, &Settings::GetAudioBackendName);
|
&Settings::ParseAudioBackend, &Settings::GetAudioBackendName);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.syncToOutput, "Audio/Sync");
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.syncToOutput, "Audio/Sync");
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.startDumpingOnBoot, "Audio/DumpOnBoot");
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioSettingsWidget::~AudioSettingsWidget() = default;
|
AudioSettingsWidget::~AudioSettingsWidget() = default;
|
||||||
|
|
|
@ -86,6 +86,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="startDumpingOnBoot">
|
||||||
|
<property name="text">
|
||||||
|
<string>Start Dumping On Boot</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -480,11 +480,17 @@ void MainWindow::connectSignals()
|
||||||
|
|
||||||
m_host_interface->populateSaveStateMenus(nullptr, m_ui.menuLoadState, m_ui.menuSaveState);
|
m_host_interface->populateSaveStateMenus(nullptr, m_ui.menuLoadState, m_ui.menuSaveState);
|
||||||
|
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowVRAM, "Debug/ShowVRAM");
|
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugDumpCPUtoVRAMCopies,
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugDumpCPUtoVRAMCopies,
|
||||||
"Debug/DumpCPUToVRAMCopies");
|
"Debug/DumpCPUToVRAMCopies");
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugDumpVRAMtoCPUCopies,
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugDumpVRAMtoCPUCopies,
|
||||||
"Debug/DumpVRAMToCPUCopies");
|
"Debug/DumpVRAMToCPUCopies");
|
||||||
|
connect(m_ui.actionDumpAudio, &QAction::toggled, [this](bool checked) {
|
||||||
|
if (checked)
|
||||||
|
m_host_interface->startDumpingAudio();
|
||||||
|
else
|
||||||
|
m_host_interface->stopDumpingAudio();
|
||||||
|
});
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowVRAM, "Debug/ShowVRAM");
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowGPUState, "Debug/ShowGPUState");
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowGPUState, "Debug/ShowGPUState");
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowCDROMState,
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowCDROMState,
|
||||||
"Debug/ShowCDROMState");
|
"Debug/ShowCDROMState");
|
||||||
|
|
|
@ -121,9 +121,11 @@
|
||||||
<addaction name="menuCPUExecutionMode"/>
|
<addaction name="menuCPUExecutionMode"/>
|
||||||
<addaction name="menuRenderer"/>
|
<addaction name="menuRenderer"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionDebugShowVRAM"/>
|
<addaction name="actionDumpAudio"/>
|
||||||
<addaction name="actionDebugDumpCPUtoVRAMCopies"/>
|
<addaction name="actionDebugDumpCPUtoVRAMCopies"/>
|
||||||
<addaction name="actionDebugDumpVRAMtoCPUCopies"/>
|
<addaction name="actionDebugDumpVRAMtoCPUCopies"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionDebugShowVRAM"/>
|
||||||
<addaction name="actionDebugShowGPUState"/>
|
<addaction name="actionDebugShowGPUState"/>
|
||||||
<addaction name="actionDebugShowCDROMState"/>
|
<addaction name="actionDebugShowCDROMState"/>
|
||||||
<addaction name="actionDebugShowSPUState"/>
|
<addaction name="actionDebugShowSPUState"/>
|
||||||
|
@ -394,6 +396,14 @@
|
||||||
<string>Dump VRAM to CPU Copies</string>
|
<string>Dump VRAM to CPU Copies</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDumpAudio">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Dump Audio</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionDebugShowGPUState">
|
<action name="actionDebugShowGPUState">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
|
@ -566,6 +566,28 @@ void QtHostInterface::saveState(bool global, qint32 slot, bool block_until_done
|
||||||
SaveState(global, slot);
|
SaveState(global, slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtHostInterface::startDumpingAudio()
|
||||||
|
{
|
||||||
|
if (!isOnWorkerThread())
|
||||||
|
{
|
||||||
|
QMetaObject::invokeMethod(this, "startDumpingAudio");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StartDumpingAudio();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtHostInterface::stopDumpingAudio()
|
||||||
|
{
|
||||||
|
if (!isOnWorkerThread())
|
||||||
|
{
|
||||||
|
QMetaObject::invokeMethod(this, "stopDumpingAudio");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StopDumpingAudio();
|
||||||
|
}
|
||||||
|
|
||||||
void QtHostInterface::enableBackgroundControllerPolling()
|
void QtHostInterface::enableBackgroundControllerPolling()
|
||||||
{
|
{
|
||||||
if (!isOnWorkerThread())
|
if (!isOnWorkerThread())
|
||||||
|
|
|
@ -95,6 +95,8 @@ public Q_SLOTS:
|
||||||
void loadState(const QString& filename);
|
void loadState(const QString& filename);
|
||||||
void loadState(bool global, qint32 slot);
|
void loadState(bool global, qint32 slot);
|
||||||
void saveState(bool global, qint32 slot, bool block_until_done = false);
|
void saveState(bool global, qint32 slot, bool block_until_done = false);
|
||||||
|
void startDumpingAudio();
|
||||||
|
void stopDumpingAudio();
|
||||||
|
|
||||||
/// Enables controller polling even without a system active. Must be matched by a call to
|
/// Enables controller polling even without a system active. Must be matched by a call to
|
||||||
/// disableBackgroundControllerPolling.
|
/// disableBackgroundControllerPolling.
|
||||||
|
|
Loading…
Reference in a new issue