mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Applications+Userland: Switch to new Audio::Loader API
This commit is contained in:
parent
1f47b01e3b
commit
bad8cd3d8f
5 changed files with 31 additions and 35 deletions
|
@ -41,10 +41,10 @@ PlaybackManager::~PlaybackManager()
|
|||
{
|
||||
}
|
||||
|
||||
void PlaybackManager::set_loader(OwnPtr<Audio::WavLoader>&& loader)
|
||||
void PlaybackManager::set_loader(NonnullRefPtr<Audio::Loader>&& loader)
|
||||
{
|
||||
stop();
|
||||
m_loader = move(loader);
|
||||
m_loader = loader;
|
||||
if (m_loader) {
|
||||
m_total_length = m_loader->total_samples() / static_cast<float>(m_loader->sample_rate());
|
||||
m_timer->start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue