Magnum::Audio::StbVorbisImporter class

OGG audio importer plugin using stb_vorbis.

Imports mono, stereo and surround sound files with 16 bits per channel using the stb_vorbis library.

This plugins provides VorbisAudioImporter, but note that this plugin doesn't have complete support for all format quirks and the performance might be worse than when using plugin dedicated for given format.


This plugin depends on the Audio library and is built if MAGNUM_WITH_STBVORBISAUDIOIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load "StbVorbisAudioImporter" via Corrade::PluginManager::Manager.

Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:

add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL)

# So the dynamically loaded plugin gets built implicitly
add_dependencies(your-app MagnumPlugins::StbVorbisAudioImporter)

To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your modules/ directory, request the StbVorbisAudioImporter component of the MagnumPlugins package and link to the MagnumPlugins::StbVorbisAudioImporter target:

find_package(MagnumPlugins REQUIRED StbVorbisAudioImporter)

# ...
target_link_libraries(your-app PRIVATE MagnumPlugins::StbVorbisAudioImporter)

See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.

Behavior and limitations

The files are imported with BufferFormat::Mono16, BufferFormat::Stereo16, BufferFormat::Quad16, BufferFormat::Surround51Channel16, BufferFormat::Surround61Channel16 and BufferFormat::Surround71Channel16.

Base classes

class AbstractImporter
Base for audio importer plugins.

Constructors, destructors, conversion operators

StbVorbisImporter() explicit
Default constructor.
StbVorbisImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin) explicit
Plugin manager constructor.