1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00
serenity/Userland/Libraries/LibAudio
Sam Atkins 3b1e063d30 LibCore+Everywhere: Make Core::Stream::read() return Bytes
A mistake I've repeatedly made is along these lines:
```c++
auto nread = TRY(source_file->read(buffer));
TRY(destination_file->write(buffer));
```

It's a little clunky to have to create a Bytes or StringView from the
buffer's data pointer and the nread, and easy to forget and just use
the buffer. So, this patch changes the read() function to return a
Bytes of the data that were just read.

The other read_foo() methods will be modified in the same way in
subsequent commits.

Fixes #13687
2022-04-16 13:27:51 -04:00
..
Buffer.cpp LibAudio: Split Buffer.{h, cpp} into three files 2022-02-26 17:57:55 +01:00
Buffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CMakeLists.txt LibAudio: Split Buffer.{h, cpp} into three files 2022-02-26 17:57:55 +01:00
ConnectionFromClient.cpp Userland: Rename IPC::ServerConnection=>IPC::ConnectionToServer 2022-02-25 22:35:12 +01:00
ConnectionFromClient.h Userland: Rename IPC::ServerConnection=>IPC::ConnectionToServer 2022-02-25 22:35:12 +01:00
FlacLoader.cpp LibCore+Everywhere: Make Core::Stream::read() return Bytes 2022-04-16 13:27:51 -04:00
FlacLoader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FlacTypes.h FlacLoader: Parse SEEKTABLE header 2022-03-26 11:04:25 +01:00
Loader.cpp LibAudio: Add basic MP3 Decoder 2022-02-26 16:01:26 +01:00
Loader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LoaderError.h Libraries: Change enums to enum classes in LibAudio 2022-03-18 19:59:43 +01:00
MP3HuffmanTables.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MP3Loader.cpp LibAudio: Add basic MP3 Decoder 2022-02-26 16:01:26 +01:00
MP3Loader.h LibAudio: Add basic MP3 Decoder 2022-02-26 16:01:26 +01:00
MP3Tables.h AK+Userland: Rename Array::front/back to first/last 2022-04-06 14:31:52 +02:00
MP3Types.h LibAudio: Add basic MP3 Decoder 2022-02-26 16:01:26 +01:00
Resampler.cpp LibAudio: Split Buffer.{h, cpp} into three files 2022-02-26 17:57:55 +01:00
Resampler.h LibAudio: Make sure we initialize ResampleHelper member variables 2022-03-27 16:43:05 -07:00
Sample.h AK+Everywhere: Add sincos and use it in some places 2022-03-15 11:39:42 +01:00
SampleFormats.cpp Libraries: Change enums to enum classes in LibAudio 2022-03-18 19:59:43 +01:00
SampleFormats.h Libraries: Change enums to enum classes in LibAudio 2022-03-18 19:59:43 +01:00
WavLoader.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
WavLoader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
WavWriter.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
WavWriter.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00