mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:28: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:
parent
fc7d231b00
commit
cb0e95c928
21 changed files with 54 additions and 54 deletions
|
@ -242,7 +242,7 @@ LoaderSamples FlacLoaderPlugin::get_more_samples(size_t max_bytes_to_read_from_i
|
|||
{
|
||||
ssize_t remaining_samples = static_cast<ssize_t>(m_total_samples - m_loaded_samples);
|
||||
if (remaining_samples <= 0)
|
||||
return Buffer::create_empty();
|
||||
return LegacyBuffer::create_empty();
|
||||
|
||||
// FIXME: samples_to_read is calculated wrong, because when seeking not all samples are loaded.
|
||||
size_t samples_to_read = min(max_bytes_to_read_from_input, remaining_samples);
|
||||
|
@ -267,7 +267,7 @@ LoaderSamples FlacLoaderPlugin::get_more_samples(size_t max_bytes_to_read_from_i
|
|||
}
|
||||
|
||||
m_loaded_samples += sample_index;
|
||||
auto maybe_buffer = Buffer::create_with_samples(move(samples));
|
||||
auto maybe_buffer = LegacyBuffer::create_with_samples(move(samples));
|
||||
if (maybe_buffer.is_error())
|
||||
return LoaderError { LoaderError::Category::Internal, m_loaded_samples, "Couldn't allocate sample buffer" };
|
||||
return maybe_buffer.release_value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue