mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Everywhere: rename 'Sample' type to 'Frame'
Because it's what it really is. A frame is composed of 1 or more samples, in the case of SerenityOS 2 (stereo). This will make it less confusing for future mantainability.
This commit is contained in:
parent
f4bd095aa3
commit
0d5e1e9df1
Notes:
sideshowbarker
2024-07-18 21:03:26 +09:00
Author: https://github.com/ngc6302h
Commit: 0d5e1e9df1
Pull-request: https://github.com/SerenityOS/serenity/pull/5878
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/RealKC
Reviewed-by: https://github.com/alimpfard
7 changed files with 36 additions and 36 deletions
|
@ -86,8 +86,8 @@ void Mixer::mix()
|
|||
|
||||
active_mix_queues.remove_all_matching([&](auto& entry) { return !entry->client(); });
|
||||
|
||||
Audio::Sample mixed_buffer[1024];
|
||||
auto mixed_buffer_length = (int)(sizeof(mixed_buffer) / sizeof(Audio::Sample));
|
||||
Audio::Frame mixed_buffer[1024];
|
||||
auto mixed_buffer_length = (int)(sizeof(mixed_buffer) / sizeof(Audio::Frame));
|
||||
|
||||
// Mix the buffers together into the output
|
||||
for (auto& queue : active_mix_queues) {
|
||||
|
@ -98,7 +98,7 @@ void Mixer::mix()
|
|||
|
||||
for (int i = 0; i < mixed_buffer_length; ++i) {
|
||||
auto& mixed_sample = mixed_buffer[i];
|
||||
Audio::Sample sample;
|
||||
Audio::Frame sample;
|
||||
if (!queue->get_next_sample(sample))
|
||||
break;
|
||||
mixed_sample += sample;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue