mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
Userland: Use Core::Timer::create_foo() factory functions where possible
This commit is contained in:
parent
6edc0cf5ab
commit
e181b1cb82
12 changed files with 37 additions and 51 deletions
|
@ -11,11 +11,11 @@ PlaybackManager::PlaybackManager(NonnullRefPtr<Audio::ConnectionToServer> connec
|
|||
: m_connection(connection)
|
||||
{
|
||||
// FIXME: The buffer enqueuing should happen on a wholly independent second thread.
|
||||
m_timer = Core::Timer::construct(PlaybackManager::update_rate_ms, [&]() {
|
||||
m_timer = Core::Timer::create_repeating(PlaybackManager::update_rate_ms, [&]() {
|
||||
if (!m_loader)
|
||||
return;
|
||||
next_buffer();
|
||||
});
|
||||
}).release_value_but_fixme_should_propagate_errors();
|
||||
m_device_sample_rate = connection->get_sample_rate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue