Ladybird/Qt: Prefix AK::Duration with AK Namespace

This commit is contained in:
Andrew Kaster 2024-07-16 23:46:51 -06:00 committed by Sam Atkins
parent 39a41d59c8
commit 5ace53c96f
Notes: sideshowbarker 2024-07-18 23:46:34 +09:00
4 changed files with 7 additions and 7 deletions

View file

@ -59,7 +59,7 @@ void AudioCodecPluginQt::seek(double position)
m_audio_thread->queue_task(move(task)).release_value_but_fixme_should_propagate_errors();
}
Duration AudioCodecPluginQt::duration()
AK::Duration AudioCodecPluginQt::duration()
{
return m_audio_thread->duration();
}

View file

@ -31,7 +31,7 @@ public:
virtual void set_volume(double) override;
virtual void seek(double) override;
virtual Duration duration() override;
virtual AK::Duration duration() override;
private:
explicit AudioCodecPluginQt(NonnullOwnPtr<AudioThread>);

View file

@ -80,7 +80,7 @@ AudioThread::AudioThread(NonnullRefPtr<Audio::Loader> loader, AudioTaskQueue tas
, m_task_queue(move(task_queue))
{
auto duration = static_cast<double>(m_loader->total_samples()) / static_cast<double>(m_loader->sample_rate());
m_duration = Duration::from_milliseconds(static_cast<i64>(duration * 1000.0));
m_duration = AK::Duration::from_milliseconds(static_cast<i64>(duration * 1000.0));
}
void AudioThread::run()

View file

@ -48,12 +48,12 @@ public:
ErrorOr<void> stop();
Duration duration() const { return m_duration; }
AK::Duration duration() const { return m_duration; }
ErrorOr<void> queue_task(AudioTask task);
Q_SIGNALS:
void playback_position_updated(Duration);
void playback_position_updated(AK::Duration);
private:
AudioThread(NonnullRefPtr<Audio::Loader> loader, AudioTaskQueue task_queue);
@ -96,8 +96,8 @@ private:
QByteArray m_sample_buffer;
Duration m_duration;
Duration m_position;
AK::Duration m_duration;
AK::Duration m_position;
};
}