1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +00:00

LibAudio+Everywhere: Rename Audio::Buffer -> Audio::LegacyBuffer

With the following change in how we send audio, the old Buffer type is
not really needed anymore. However, moving WavLoader to the new system
is a bit more involved and out of the scope of this PR. Therefore, we
need to keep Buffer around, but to make it clear that it's the old
buffer type which will be removed soon, we rename it to LegacyBuffer.
Most of the users will be gone after the next commit anyways.
This commit is contained in:
kleines Filmröllchen 2022-02-20 13:18:38 +01:00 committed by Linus Groh
parent fc7d231b00
commit cb0e95c928
21 changed files with 54 additions and 54 deletions

View file

@ -53,7 +53,7 @@ LoaderSamples WavLoaderPlugin::get_more_samples(size_t max_bytes_to_read_from_in
int remaining_samples = m_total_samples - m_loaded_samples;
if (remaining_samples <= 0)
return Buffer::create_empty();
return LegacyBuffer::create_empty();
// One "sample" contains data from all channels.
// In the Wave spec, this is also called a block.
@ -78,7 +78,7 @@ LoaderSamples WavLoaderPlugin::get_more_samples(size_t max_bytes_to_read_from_in
if (m_stream->handle_any_error())
return LoaderError { LoaderError::Category::IO, static_cast<size_t>(m_loaded_samples), "Stream read error" };
auto buffer = Buffer::from_pcm_data(
auto buffer = LegacyBuffer::from_pcm_data(
sample_data.bytes(),
m_num_channels,
m_sample_format);