DrWavImporter class
WAV audio importer plugin using dr_wav.
Imports mono, stereo and surround sound files using the dr_
This plugins provides WavAudioImporter, but note that this plugin doesn't handle some errata such as JUNK blocks in strange places.
Usage
This plugin depends on the Audio library and is built if MAGNUM_WITH_DRWAVAUDIOIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load "DrWavAudioImporter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(MAGNUM_WITH_DRWAVAUDIOIMPORTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::DrWavAudioImporter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your modules/ directory, request the DrWavAudioImporter component of the MagnumPlugins package and link to the MagnumPlugins::DrWavAudioImporter target:
find_package(MagnumPlugins REQUIRED DrWavAudioImporter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::DrWavAudioImporter)
See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.
Behavior and limitations
The files are imported in the following formats:
- 8 bit-per-channel PCM is imported as BufferFormat::
Mono8, BufferFormat:: Stereo8, BufferFormat:: Quad8, BufferFormat:: Surround51Channel8, BufferFormat:: Surround61Channel8 or BufferFormat:: Surround71Channel8 - 12 and 16 bit-per-channel PCM is imported as BufferFormat::
Mono16, BufferFormat:: Stereo16, BufferFormat:: Quad16, BufferFormat:: Surround51Channel16, BufferFormat:: Surround61Channel16 or BufferFormat:: Surround71Channel16 - 24 and 32 bit-per-channel PCM and 32-bit IEEE Float is imported as BufferFormat::
MonoFloat, BufferFormat:: StereoFloat, BufferFormat:: Quad32, BufferFormat:: Surround51Channel32, BufferFormat:: Surround61Channel32 or BufferFormat:: Surround71Channel32 - 64-bit IEEE Float is imported as BufferFormat::
MonoDouble, BufferFormat:: StereoDouble, BufferFormat:: Quad32, BufferFormat:: Surround51Channel32, BufferFormat:: Surround61Channel32 or BufferFormat:: Surround71Channel32 - A-Law is imported as BufferFormat::
MonoALaw / BufferFormat:: StereoALaw - μ-Law is imported as BufferFormat::
MonoMuLaw / BufferFormat:: StereoMuLaw
Base classes
- class AbstractImporter
- Base for audio importer plugins.
Constructors, destructors, conversion operators
- DrWavImporter() deprecated in Git master explicit
- Default constructor.
-
DrWavImporter(PluginManager::
AbstractManager& manager, const Containers:: StringView& plugin) explicit - Plugin manager constructor.
Function documentation
Magnum:: Audio:: DrWavImporter:: DrWavImporter() explicit
Default constructor.