Here is my idea (I know I just said this in IRC, but in this way people can discuss):
Code:
0x30..0x4E dd : one operand, reserved for future use
(stuff) 0x4E 0x00 (more stuff) 0x4E 0xNUM (even more stuff)
The player detects the 0x4E 0x00 as the beginning of the loop and saves that position in memory, so when it encounters the other 0x4E it goes back a certain number of times. When seeking it could be ignored, but:
Quote:
<ValleyBell> but still ... it would look very odd in Winamp
<nineko> Right
<nineko> Then don't ignore it while seeking, and have Winamp calculate the "unrolled" length in advance
Just a random idea.
The 0x4E 0x00 can be replaced by a 1-byte unused command, too. In this way the start of the loop can be simply represented as 0xXX, and consider 0x4E 0x00 as a 0x4E 0x100 (e.g. 256 loops).