1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:57:34 +00:00

LibAudio: Remove the last occurrence of Core::File in the Wav plugin

This commit is contained in:
Lucas CHOLLET 2022-10-13 15:19:36 +02:00 committed by Linus Groh
parent 2d6124049a
commit f028930033
2 changed files with 3 additions and 5 deletions

View file

@ -19,7 +19,7 @@ namespace Audio {
static constexpr size_t const maximum_wav_size = 1 * GiB; // FIXME: is there a more appropriate size limit?
WavLoaderPlugin::WavLoaderPlugin(StringView path)
: m_file(Core::File::construct(path))
: m_path(path)
{
}
@ -28,7 +28,7 @@ MaybeLoaderError WavLoaderPlugin::initialize()
if (m_backing_memory.has_value())
m_stream = LOADER_TRY(Core::Stream::MemoryStream::construct(m_backing_memory.value()));
else
m_stream = LOADER_TRY(Core::Stream::File::open(m_file->filename(), Core::Stream::OpenMode::Read));
m_stream = LOADER_TRY(Core::Stream::File::open(m_path, Core::Stream::OpenMode::Read));
TRY(parse_header());
return {};