FLAC audio importer plugin using dr_flac.
Supports mono, stereo and surround sound files of the following formats using the dr_
- 8 bit-per-channel, imported as BufferFormat::
Mono8, BufferFormat:: Stereo8, BufferFormat:: Quad8, BufferFormat:: Surround51Channel8, BufferFormat:: Surround61Channel8 or BufferFormat:: Surround71Channel8
- 16 bit-per-channel, imported as BufferFormat::
Mono16, BufferFormat:: Stereo16, BufferFormat:: Quad16, BufferFormat:: Surround51Channel16, BufferFormat:: Surround61Channel16 or BufferFormat:: Surround71Channel16
- 24 bit-per-channel, imported as BufferFormat::
MonoFloat, BufferFormat:: StereoFloat, BufferFormat:: Quad32, BufferFormat:: Surround51Channel32, BufferFormat:: Surround61Channel32 or BufferFormat:: Surround71Channel32
Although technically FLAC supports 32 bits per channel as well, not even the reference encoder supports that, which makes it impossible to verify whether dr_flac is capable of importing such files, and thus handling of such files is not implemented.
This plugins provides
FlacAudioImporter, but note that this plugin doesn't handle CRC checks, corrupt or perverse FLAC streams, or broadcast streams.
This plugin depends on the Audio library and is built if
MAGNUM_WITH_DRFLACAUDIOIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load
"DrFlacAudioImporter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(MAGNUM_WITH_DRFLACAUDIOIMPORTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::DrFlacAudioImporter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your
modules/ directory, request the
DrFlacAudioImporter component of the
MagnumPlugins package and link to the
find_package(MagnumPlugins REQUIRED DrFlacAudioImporter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::DrFlacAudioImporter)
- class AbstractImporter
- Base for audio importer plugins.