mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(asm): Change the scaling to 29 in the speed unti (29 increments = double speed).
The old speed scaling of 24 was ill-chosen so that triplets resulted in a minor buffer overflow error. This was never caught by anyone until Visual Studio 2019 in debug mode. Presumably all compilers allocate some extra space so this didn't matter. Now 29 increments = double speed and speeds with alternating 52 and 81 result in triplets that are just slightly faster then ordinary bpm i.e. the buffer will be slightly underrun, which probably is unnoticable to the user.
This commit is contained in:
parent
c39f434c6b
commit
1b1dabafb8
@ -546,7 +546,7 @@ c_freq_normalize dd 0.000092696138 ; // 220.0/(2^(69/12)) / 44100.0
|
||||
%endif
|
||||
|
||||
%ifdef USE_C_BPMSCALE
|
||||
c_bpmscale dd 2.666666666666 ; 64/24, 24 values will be double speed, so you can go from ~ 1/2.5 speed to 2.5x speed
|
||||
c_bpmscale dd 2.206896551724138 ; 64/29, 29 values will be double speed, so you can go from ~ 1/2.2 speed to 2.2x speed
|
||||
%endif
|
||||
|
||||
%ifdef USE_C_16
|
||||
|
Binary file not shown.
@ -50,12 +50,14 @@ int main(int argc, char* argv[]) {
|
||||
float v;
|
||||
bufsize = su_max_samples * 2 * sizeof(float);
|
||||
buf = (float*)malloc(bufsize);
|
||||
memset(buf, 0, bufsize);
|
||||
#else
|
||||
short* buf = NULL;
|
||||
short* filebuf = NULL;
|
||||
short v;
|
||||
bufsize = su_max_samples * 2 * sizeof(short);
|
||||
buf = (short*)malloc(bufsize);
|
||||
memset(buf, 0, bufsize);
|
||||
#endif
|
||||
|
||||
if (buf == NULL) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
BEGIN_PATTERNS
|
||||
PATTERN 64,0,64,64,64,0,64,64,64,0,64,64,65,0,65,65
|
||||
PATTERN 64,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0
|
||||
PATTERN 78,0,54, 0,78,0,54, 0,78,0,54, 0,78,0,54, 0
|
||||
PATTERN 81,0,52, 0,81,0,52, 0,81,0,52, 0,81,0,52, 0
|
||||
END_PATTERNS
|
||||
|
||||
BEGIN_TRACKS
|
||||
|
Loading…
Reference in New Issue
Block a user