mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 16:58:58 +00:00
LibMedia: Note that PlaybackStream callbacks cannot run simultaneously
This is a requirement of implementations of PlaybackStream, so we should have a little comment about it. Otherwise, we may encounter data races later.
This commit is contained in:
parent
e095bf3a5f
commit
33e97fa5d7
Notes:
github-actions[bot]
2025-09-04 17:30:48 +00:00
Author: https://github.com/Zaggy1024
Commit: 33e97fa5d7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6077
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 3 additions and 2 deletions
|
@ -34,8 +34,9 @@ public:
|
|||
//
|
||||
// The initial_output_state parameter determines whether it will begin playback immediately.
|
||||
//
|
||||
// The AudioDataRequestCallback will be called when the Output needs more audio data to fill
|
||||
// its buffers and continue playback.
|
||||
// The AudioDataRequestCallback will be called when the Output needs more audio data to fill its buffers and
|
||||
// continue playback. This callback will only be allowed to run on one thread at a time, to prevent any data
|
||||
// race on the resource used by the callback.
|
||||
static ErrorOr<NonnullRefPtr<PlaybackStream>> create(OutputState initial_output_state, u32 sample_rate, u8 channels, u32 target_latency_ms, AudioDataRequestCallback&&);
|
||||
|
||||
virtual ~PlaybackStream() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue