Base for audio importer plugins.
The data returned from various functions by design have no dependency on the importer instance and neither on the dynamic plugin module. In other words, you don't need to keep the importer instance (or the plugin manager instance) around in order to have the returned data valid. Moreover, all returned Corrade::
You don't need to do most of the redundant sanity checks, these things are checked by the implementation:
- Functions doOpenData() and doOpenFile() are called after the previous file was closed, function doClose() is called only if there is any file opened.
- Function doOpenData() is called only if ImporterFeature::
OpenData is supported.
do*()implementations working on opened file are called only if there is any file opened.
- class AnyImporter
- Any audio importer plugin.
- class DrFlacImporter
- FLAC audio importer plugin using dr_flac.
- class DrMp3Importer new in 2019.10
- MP3 audio importer plugin using dr_mp3.
- class DrWavImporter
- WAV audio importer plugin using dr_wav.
- class Faad2Importer
- AAC audio importer plugin using FAAD2.
- class StbVorbisImporter
- OGG audio importer plugin using stb_vorbis.
- class WavImporter
- WAV importer plugin.
- auto features() const -> ImporterFeatures
- Features supported by this importer.
- auto isOpened() const -> bool
- Whether any file is opened.
ArrayView<const char> data) -> bool
- Open raw data.
auto openFile(const std::
string& filename) -> bool
- Open file.
- void close()
- Close file.
- auto doFeatures() const -> ImporterFeatures pure virtual
- Implementation for features()
- auto doIsOpened() const -> bool pure virtual
- Implementation for isOpened()
ArrayView<const char> data) virtual
- Implementation for openData()
void doOpenFile(const std::
string& filename) virtual
- Implementation for openFile()
- void doClose() pure virtual
- Implementation for close()
- auto doFormat() const -> BufferFormat pure virtual
- Implementation for format()
- auto doFrequency() const -> UnsignedInt pure virtual
- Implementation for frequency()
auto doData() -> Containers::
Array<char> pure virtual
- Implementation for data()
vector<std:: string> Magnum:: Audio:: AbstractImporter:: pluginSearchPaths()
Plugin search paths.
magnum-d/audioimporters/ next to the dynamic Trade library, next to the executable and elsewhere according to the rules documented in Corrade::
MAGNUM_PLUGINS_DIR CMake variables, see Downloading and building for more information.
Not defined on platforms without dynamic plugin support.