diff options
author | kleines Filmröllchen <malu.bertsch@gmail.com> | 2021-10-06 16:56:24 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-11-08 16:29:25 -0800 |
commit | 8945cc83583170d8e2dc9e9a408e84120c67b8c5 (patch) | |
tree | ef182e7aa0fd87904d37d0c82d98fb73ef86d6d1 | |
parent | b6d075bb0105dd5c66760e274074eb91deff3df3 (diff) | |
download | serenity-8945cc83583170d8e2dc9e9a408e84120c67b8c5.zip |
LibAudio: Improve local variable names
This makes the code easier to read.
-rw-r--r-- | Userland/Libraries/LibAudio/Buffer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibAudio/Buffer.cpp b/Userland/Libraries/LibAudio/Buffer.cpp index b53fc9d5bf..b1ab8184c5 100644 --- a/Userland/Libraries/LibAudio/Buffer.cpp +++ b/Userland/Libraries/LibAudio/Buffer.cpp @@ -47,14 +47,14 @@ i32 Buffer::allocate_id() template<typename SampleReader> static void read_samples_from_stream(InputMemoryStream& stream, SampleReader read_sample, Vector<Sample>& samples, int num_channels) { - double norm_l = 0; - double norm_r = 0; + double left_channel_sample = 0; + double right_channel_sample = 0; switch (num_channels) { case 1: for (;;) { - norm_l = read_sample(stream); - samples.append(Sample(norm_l)); + left_channel_sample = read_sample(stream); + samples.append(Sample(left_channel_sample)); if (stream.handle_any_error()) { break; @@ -63,9 +63,9 @@ static void read_samples_from_stream(InputMemoryStream& stream, SampleReader rea break; case 2: for (;;) { - norm_l = read_sample(stream); - norm_r = read_sample(stream); - samples.append(Sample(norm_l, norm_r)); + left_channel_sample = read_sample(stream); + right_channel_sample = read_sample(stream); + samples.append(Sample(left_channel_sample, right_channel_sample)); if (stream.handle_any_error()) { break; |