ExtendedAudioImporter for Duality Editor
Extended audio format support for Duality 2D Game Development Framework http://duality.adamslair.net
Duality is a plugin based games development framework designed to be a minimal interface into which more specific or complex packages are "plugged in". Since Vorbis is used as Duality's primary audio compression mechanism, it has built in support for importing OGG Vorbis files. It does not provide any mechanism to load or save any other audio file formats.
This project aims to extend the number of audio formats supported by implementing an editor plugin which fits into Duality's asset importing workflow. Simply drag new audio files into Duality's Project View.
- .aiff (including files with extensions: .aif, .aifc)
ExtendedAudioImporter uses libsox to import audio files of various flavours. The formats exposed here have been confirmed working to some degree. Since libsox actually allows many more formats to be loaded, new formats will be exposed as and when they have been reasonably tested.
ExtendedAudioImporter can be installed via Duality Editor's package management dialog, or by cloning this GitHub project and building in Visual Studio.
Via Duality Editor
ExtendedAudioImporter can be installed via Duality Editor's built in package manager.
- Change the package view to "Online Repository"
- Search for "Extended Audio Importer"
- Press the "Install" button
- Clone this repository: E.g. git clone firstname.lastname@example.org:importjingles/ExtendedAudioImporter.git
- Build the project
- Copy the following built files into YourProject/Plugins/:
- (optional) Copy associated .pdb files
- Run YourProject/DualityEditor.exe - You should see the log line: [Core] Info: Assembly loaded: ExtendedAudioImporter.editor
Simply drag audio files into Duality:
Building ExtendedAudioImporter From Source
ExtendedAudioImporter is made up of the following parts:
- Core ExtendedAudioImporter project
- Contains Editor plugin interface
- Contains new asset importer for AudioData objects
- Also contains a very basic WAVExporter class for asset exporting
- CLR compatible wrapper for libsox
- Split into separate x86 and x64 binaries to make it easier to build under "Any CPU" configuration
- libsox and its main dependencies
ExtendedAudioImporter will pick the correct SoXWrapper for your platform at runtime.
The following dependencies must be gathered prior to building ExtendedAudioImporter manually:
libflac, libogg and libvorbis - https://www.xiph.org/ (project tested with libflac-1.3.1, libogg-1.3.2, libvorbis-1.3.5)
libsox - http://sox.sourceforge.net/ (project tested with libsox-14.4.2)
libmad - http://www.underbit.com/products/mad/ (project tested with libmad-0.15.1b)
Dependency folders should be renamed as follows (strip off version numbers):
Basic Visual Studio 2013 project files are included to compile the essentials. These were borrowed and adapted from libsox. Each project file has an x86 and x64 version to make compiling using a single configuration in C# easier (Any CPU).
All projects produce static libraries and are linked into the SoXWrapper project.
Building in Visual Studio
- Ensure you have acquired all dependencies and they are in the correct folders (see above)
- Open ExtendedAudioImporter.sln
- Choose either Debug or Release configuration
- From the Build menu, click Build Solution
- The following plugin files will end up in bin/Release/ (or bin/Debug/):
Other build environments...
...are not currently supported. Contributions most welcome!