I want to update some values inside the SMPL chunk metadata in a wav file.
I have a wav file that is a one shot sample. It has the SMPL chunk that it is useful for information like “MidiUnityNote” or “MidiPitchFraction”. The value of “NumSampleLoops” is 0 (and it is correct since it is a one shot sample). But when “NumSampleLoops” key is 0 the SMPL chunk is not written into the wave file.
Infact inside juce_WavAudioFormat.cpp the function SMPLChunk::createFrom() skips completely all the chunk so that the resulting file does not have this chunk anymore.
It seems to me that this behaviour is not correct.
The chunk should be saved anywway with “NumSampleLoops” = 0 (as it is in the original file).
Can it be changed?