mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 07:40:23 +02:00
Add dump of active AUP3 XML doc to support data
This commit is contained in:
parent
5861ce3c66
commit
b928e7e9f2
@ -25,6 +25,8 @@
|
||||
#include "AudioIOBase.h"
|
||||
#include "FileNames.h"
|
||||
#include "Internat.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "prefs/GUIPrefs.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
@ -64,9 +66,12 @@ void Generate(wxDebugReport::Context ctx)
|
||||
|
||||
auto gAudioIO = AudioIOBase::Get();
|
||||
rpt.AddText(wxT("audiodev.txt"), gAudioIO->GetDeviceInfo(), wxT("Audio Device Info"));
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
rpt.AddText(wxT("mididev.txt"), gAudioIO->GetMidiDeviceInfo(), wxT("MIDI Device Info"));
|
||||
#endif
|
||||
#endif
|
||||
auto project = GetActiveProject();
|
||||
auto &projectFileIO = ProjectFileIO::Get( *project );
|
||||
rpt.AddText(wxT("project.txt"), projectFileIO.GenerateDoc(), wxT("Active project doc"));
|
||||
}
|
||||
|
||||
auto logger = AudacityLogger::Get();
|
||||
|
@ -288,6 +288,16 @@ DBConnection &ProjectFileIO::GetConnection()
|
||||
return *curConn;
|
||||
}
|
||||
|
||||
wxString ProjectFileIO::GenerateDoc()
|
||||
{
|
||||
auto &trackList = TrackList::Get( mProject );
|
||||
|
||||
XMLStringWriter doc;
|
||||
WriteXMLHeader(doc);
|
||||
WriteXML(doc, false, trackList.empty() ? nullptr : &trackList);
|
||||
return doc;
|
||||
}
|
||||
|
||||
sqlite3 *ProjectFileIO::DB()
|
||||
{
|
||||
return GetConnection().DB();
|
||||
|
@ -189,6 +189,9 @@ public:
|
||||
//! Return a reference to a connection, creating it as needed on demand; throw on failure
|
||||
DBConnection &GetConnection();
|
||||
|
||||
//! Return a strings representation of the active project XML doc
|
||||
wxString GenerateDoc();
|
||||
|
||||
private:
|
||||
void OnCheckpointFailure();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user