; If set to 1, timing information is generated during music generation ; which is needed for Clinkster_GetInstrumentTrigger. ; Set it to 0 if you don't need this functionality. %define CLINKSTER_GENERATE_TIMING_DATA 1 ; Offset applied by Clinkster_GetPosition to compensate for graphics latency. ; Measured in samples (44100ths of a second). ; The default value of 2048 (corresponding to about 46 milliseconds) is ; appropriate for typical display latencies for high-framerate effects. %define CLINKSTER_TIMER_OFFSET 2048 %include "music-linux.asm" ;; ********** Definitions ********** global Clinkster_GenerateMusic global Clinkster_StartMusic global Clinkster_GetPosition global Clinkster_GetInstrumentTrigger global Clinkster_MusicBuffer global Clinkster_TicksPerSecond global Clinkster_MusicLength global Clinkster_NumTracks %if CLINKSTER_GENERATE_TIMING_DATA global Clinkster_NoteTiming %endif global c_timeoffset global c_ticklength %define SAMPLE_RATE 44100 %define WAVE_SIZE 65536 ;; ********** Public variables ********** section .bss align=4 Clinkster_MusicBuffer: align 16 resw (TOTAL_SAMPLES*2) section .rodata align=4 Clinkster_TicksPerSecond: dd TICKS_PER_SECOND section .rodata align=4 Clinkster_MusicLength: dd MUSIC_LENGTH section .rodata align=4 Clinkster_NumTracks: dd NUMTRACKS %if CLINKSTER_GENERATE_TIMING_DATA section .bss align=4 Clinkster_NoteTiming: align 16 resd 2*(NUMTRACKS<