mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ladybird/Qt: Prefix AK::Duration with AK Namespace
This commit is contained in:
parent
39a41d59c8
commit
5ace53c96f
Notes:
sideshowbarker
2024-07-18 23:46:34 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/5ace53c96fa Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/676 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/trflynn89 ✅
4 changed files with 7 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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>);
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue