Execution::MetronomeSounds Struct Reference

Public Member Functions

 operator bool () const noexcept
 

Public Attributes

const QString root
 
const std::unique_ptr< Media::AudioFiletick
 
const std::unique_ptr< Media::AudioFiletock
 
const Media::AudioFile::ViewHandle tick_handle {tick->handle()}
 
const Media::AudioFile::ViewHandle tock_handle {tock->handle()}
 

Member Data Documentation

◆ root

const QString Execution::MetronomeSounds::root
Initial value:
= score::AppContext().settings<Library::Settings::Model>().getDefaultLibraryPath()
+ "/Util/"
Definition: LibrarySettings.hpp:46
T & settings() const
Access a specific Settings model instance.
Definition: ApplicationContext.hpp:40

◆ tick

const std::unique_ptr<Media::AudioFile> Execution::MetronomeSounds::tick
Initial value:
{[this] {
auto f = std::make_unique<Media::AudioFile>();
f->load(
{root + "/metro_tick.wav", root + "/metro_tick.wav",
Media::DecodingMethod::Libav});
while(f->samples() != f->decodedSamples())
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
qApp->processEvents();
}
return f;
}()}

◆ tock

const std::unique_ptr<Media::AudioFile> Execution::MetronomeSounds::tock
Initial value:
{[this] {
auto f = std::make_unique<Media::AudioFile>();
f->load(
{root + "/metro_tock.wav", root + "/metro_tock.wav",
Media::DecodingMethod::Libav});
while(f->samples() != f->decodedSamples())
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
qApp->processEvents();
}
return f;
}()}

The documentation for this struct was generated from the following file:
  • MetroExecutor.cpp