16#include "aeongames/Sound.hpp"
17#include "aeongames/Utilities.hpp"
18#include "aeongames/ResourceCache.hpp"
20#include <unordered_map>
static bool Decode(T &aOutput, uint32_t aId)
Decodes a resource identified by its CRC32 id.
static bool RegisterDecoder(const std::string &aMagick, const std::function< bool(T &, size_t, const void *) > &aDecoder)
Registers a decoder function for the given magic byte sequence.
static bool UnregisterDecoder(const std::string &aMagick)
Unregisters the decoder for the given magic byte sequence.
Abstract base class representing a decoded sound resource.
<- This is here just for the literals
DLL bool RegisterSoundDecoder(const std::string &aMagick, const std::function< bool(Sound &, size_t, const void *) > &aDecoder)
Register a sound decoder for the given magic identifier.
DLL bool DecodeSound(Sound &aSound, size_t aBufferSize, const void *aBuffer)
Decode sound data from a memory buffer.
DLL bool UnregisterSoundDecoder(const std::string &aMagick)
Unregister a previously registered sound decoder.