mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
libardour: provide a global function for resetting performance meters
This commit is contained in:
parent
86325ef89b
commit
b939b2e68d
2 changed files with 20 additions and 0 deletions
|
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue