/* * Copyright (c) 2018-2021, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace Audio { Loader::Loader(const StringView& path) { m_plugin = make(path); if (m_plugin->sniff()) return; m_plugin = make(path); if (m_plugin->sniff()) return; m_plugin = nullptr; } Loader::Loader(const ByteBuffer& buffer) { m_plugin = make(buffer); if (m_plugin->sniff()) return; m_plugin = make(buffer); if (m_plugin->sniff()) { dbgln("FLAC sniff successful"); return; } m_plugin = nullptr; } }