View Issue Details

IDProjectCategoryView StatusLast Update
0000355OpenMPTFile Format Supportpublic2013-02-25 13:18
Reporterrainwarrior Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product VersionOpenMPT 1.21.01.00 (upgrade first) 
Summary0000355: WAV smpl chunk loop
Description

The smpl chunk loop start and end are defined as byte offsets, rather than sample counts. For 8-bit samples this does not matter, but for 16-bit samples this causes the loop position to be off by a factor of 2.

Steps To Reproduce

Load a 16-bit WAV with a smpl chunk that has a loop, observe that the loop point is incorrect.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2013-02-24 13:43

administrator   ~0001110

Last edited: 2013-02-24 13:49

From the official RIFF specifications by Microsoft (RIFFNEW.pdf):
dwStart: Specifies the startpoint of the loop in samples.
dwEnd: Specifies the endpoint of the loop in samples (this sample will also be
played).
All wave editing programs that I have worked with so far (including Wavelab and Wavosaur) adhere to this specification. So where do you have this information from, and which application specifies loop points as byte offsets? This application needs fixing, not OpenMPT.

rainwarrior

rainwarrior

2013-02-25 02:44

reporter   ~0001111

Last edited: 2013-02-25 02:45

Ah, I was going by these two sources:
http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/wave.htm
http://www.sonicspot.com/guide/wavefiles.html

I did not know about RIFFNEW.pdf, but I will presume it has stronger authority. Also this makes more sense, since it resolves some ambiguity (i.e. a byte offset to the last sampled played... would that have been the last byte or the first byte of that sample?).

Thanks for replying, this has been helpful. Please close this bug. (I can't figure out how to close it myself.)

Issue History

Date Modified Username Field Change
2013-02-24 13:22 rainwarrior New Issue
2013-02-24 13:43 Saga Musix Note Added: 0001110
2013-02-24 13:43 Saga Musix Assigned To => Saga Musix
2013-02-24 13:43 Saga Musix Status new => feedback
2013-02-24 13:49 Saga Musix Note Edited: 0001110
2013-02-25 02:44 rainwarrior Note Added: 0001111
2013-02-25 02:44 rainwarrior Status feedback => assigned
2013-02-25 02:45 rainwarrior Note Edited: 0001111
2013-02-25 13:18 Saga Musix Status assigned => closed
2013-02-25 13:18 Saga Musix Resolution open => no change required