The function NyquistIO::Load(AudioData * data, const std::vector<uint8_t> & buffer) creates a temporary map of magic identifiers to extensions every time it's called. Since this is a read-only map it's probably best to make this a global constant to eliminate the overhead.
The function also continues scanning for magic after it's found a match, is that required? Otherwise i'll make a separate issue for that.
The function
NyquistIO::Load(AudioData * data, const std::vector<uint8_t> & buffer)
creates a temporary map of magic identifiers to extensions every time it's called. Since this is a read-only map it's probably best to make this a global constant to eliminate the overhead.The function also continues scanning for magic after it's found a match, is that required? Otherwise i'll make a separate issue for that.