1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibAudio: Revert to using buffered file reading

This was slowing down FLACLoader below realtime. The real solution is
still to use mapped files but that has to wait until a larger refactor.
This commit is contained in:
kleines Filmröllchen 2022-11-13 17:34:58 +01:00 committed by Linus Groh
parent 276be7f8cc
commit f54462c424

View file

@ -26,7 +26,7 @@ MaybeLoaderError LoaderPlugin::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_path, Core::Stream::OpenMode::Read));
m_stream = LOADER_TRY(Core::Stream::BufferedFile::create(LOADER_TRY(Core::Stream::File::open(m_path, Core::Stream::OpenMode::Read))));
return {};
}