mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibMedia: Remove preprocessor chain when initializing audio streams
Instead of having to duplicate the audio stream backend conditions, just define PlaybackStream::create in each audio backend implementation file. We provide a weak definition in PlaybackStream.cpp as the fallback.
This commit is contained in:
parent
4d866f22a4
commit
dfa727a4d4
Notes:
github-actions[bot]
2024-12-25 11:01:55 +00:00
Author: https://github.com/trflynn89
Commit: dfa727a4d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3027
4 changed files with 18 additions and 24 deletions
|
@ -215,6 +215,11 @@ private:
|
|||
Atomic<i64> m_last_sample_time { 0 };
|
||||
};
|
||||
|
||||
ErrorOr<NonnullRefPtr<PlaybackStream>> PlaybackStream::create(OutputState initial_output_state, u32 sample_rate, u8 channels, u32 target_latency_ms, AudioDataRequestCallback&& data_request_callback)
|
||||
{
|
||||
return PlaybackStreamAudioUnit::create(initial_output_state, sample_rate, channels, target_latency_ms, move(data_request_callback));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<PlaybackStream>> PlaybackStreamAudioUnit::create(OutputState initial_output_state, u32 sample_rate, u8 channels, u32, AudioDataRequestCallback&& data_request_callback)
|
||||
{
|
||||
AudioStreamBasicDescription description {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue