mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:28:13 +00:00
LibCore: Rename MemoryStream
to FixedMemoryStream
This is to differentiate between the upcoming `AllocatingMemoryStream`, which automatically allocates memory as needed instead of operating on a static memory area.
This commit is contained in:
parent
c4f68bde57
commit
c6d71ca727
11 changed files with 29 additions and 27 deletions
|
@ -35,7 +35,7 @@ Result<NonnullOwnPtr<WavLoaderPlugin>, LoaderError> WavLoaderPlugin::try_create(
|
|||
|
||||
Result<NonnullOwnPtr<WavLoaderPlugin>, LoaderError> WavLoaderPlugin::try_create(Bytes buffer)
|
||||
{
|
||||
auto stream = LOADER_TRY(Core::Stream::MemoryStream::construct(buffer));
|
||||
auto stream = LOADER_TRY(Core::Stream::FixedMemoryStream::construct(buffer));
|
||||
auto loader = make<WavLoaderPlugin>(move(stream));
|
||||
|
||||
LOADER_TRY(loader->initialize());
|
||||
|
@ -115,7 +115,7 @@ static ErrorOr<double> read_sample(Core::Stream::Stream& stream)
|
|||
LoaderSamples WavLoaderPlugin::samples_from_pcm_data(Bytes const& data, size_t samples_to_read) const
|
||||
{
|
||||
FixedArray<Sample> samples = LOADER_TRY(FixedArray<Sample>::try_create(samples_to_read));
|
||||
auto stream = LOADER_TRY(Core::Stream::MemoryStream::construct(move(data)));
|
||||
auto stream = LOADER_TRY(Core::Stream::FixedMemoryStream::construct(move(data)));
|
||||
|
||||
switch (m_sample_format) {
|
||||
case PcmSampleFormat::Uint8:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue