libnyquist icon indicating copy to clipboard operation
libnyquist copied to clipboard

NyquistIO::Load creates temporary map every time it's called

Open SamVanheer opened this issue 2 years ago • 0 comments

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.

SamVanheer avatar Jun 07 '22 11:06 SamVanheer