Browse Source

Add track

merge-requests/1/head
Miloslav Číž 3 years ago
parent
commit
dea0c87f33
  1. 12
      sounds.h

12
sounds.h

@ -53,7 +53,7 @@ uint8_t SFG_getNextMusicSample() @@ -53,7 +53,7 @@ uint8_t SFG_getNextMusicSample()
{
SFG_MusicState.track++;
if (SFG_MusicState.track >= 5)
if (SFG_MusicState.track >= 6)
SFG_MusicState.track = 0;
SFG_MusicState.t = 0;
@ -113,6 +113,16 @@ uint8_t SFG_getNextMusicSample() @@ -113,6 +113,16 @@ uint8_t SFG_getNextMusicSample()
break;
}
case 5:
{
uint32_t a = t >> (t >> 6);
uint32_t b = 0x011121 >> ((a + t) >> 11);
result =
(((t >> 9) + (t ^ (t << 1))) & (0x7f >> ((t >> 15) & 0x03))) & (b + a);
break;
}
default:
result = 127;
break;

Loading…
Cancel
Save