libardour: provide a global function for resetting performance meters
This commit is contained in:
@@ -49,6 +49,7 @@ namespace MIDI {
|
||||
namespace ARDOUR {
|
||||
|
||||
class AudioEngine;
|
||||
class Session;
|
||||
|
||||
extern LIBARDOUR_API PBD::Signal1<void,std::string> BootMessage;
|
||||
extern LIBARDOUR_API PBD::Signal3<void,std::string,std::string,bool> PluginScanMessage;
|
||||
@@ -94,6 +95,8 @@ namespace ARDOUR {
|
||||
*/
|
||||
LIBARDOUR_API void check_for_old_configuration_files ();
|
||||
LIBARDOUR_API int handle_old_configuration_files (boost::function<bool (std::string const&, std::string const&, int)> ui_handler);
|
||||
|
||||
LIBARDOUR_API void reset_performance_meters (Session*);
|
||||
}
|
||||
|
||||
#endif /* __ardour_ardour_h__ */
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
#include "ardour/region.h"
|
||||
#include "ardour/route_group.h"
|
||||
#include "ardour/runtime_functions.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/session_event.h"
|
||||
#include "ardour/source_factory.h"
|
||||
#include "ardour/transport_fsm.h"
|
||||
@@ -993,3 +994,19 @@ ARDOUR::format_data_width (ARDOUR::SampleFormat format)
|
||||
return 32;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR::reset_performance_meters (Session *session)
|
||||
{
|
||||
if (session) {
|
||||
for (size_t n = 0; n < Session::NTT; ++n) {
|
||||
session->dsp_stats[n].queue_reset ();
|
||||
}
|
||||
}
|
||||
for (size_t n = 0; n < AudioEngine::NTT; ++n) {
|
||||
AudioEngine::instance()->dsp_stats[n].queue_reset ();
|
||||
}
|
||||
for (size_t n = 0; n < AudioBackend::NTT; ++n) {
|
||||
AudioEngine::instance()->current_backend()->dsp_stats[n].queue_reset ();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user