mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
Specifically: * Added win32, elf32 and elf64 asm player and wav writers using winmm. * Added dsound player in C. * Separated the ALL target and the examples; introduced a new examples target.
53 lines
1.4 KiB
SourcePawn
53 lines
1.4 KiB
SourcePawn
; auto-generated by Sointu, editing not recommended
|
|
%ifndef PLAYER_INC
|
|
%define PLAYER_INC
|
|
|
|
%define SU_CHANNEL_COUNT 2
|
|
%define SU_LENGTH_IN_SAMPLES {{.MaxSamples}}
|
|
%define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
|
|
|
|
%define SU_SAMPLE_RATE 44100
|
|
%define SU_BPM {{.Song.BPM}}
|
|
%define SU_ROWS_PER_BEAT {{.Song.RowsPerBeat}}
|
|
%define SU_ROWS_PER_PATTERN {{.Song.Score.RowsPerPattern}}
|
|
%define SU_LENGTH_IN_PATTERNS {{.Song.Score.Length}}
|
|
%define SU_LENGTH_IN_ROWS (SU_LENGTH_IN_PATTERNS*SU_PATTERN_SIZE)
|
|
%define SU_SAMPLES_PER_ROW (SU_SAMPLE_RATE*60/(SU_BPM*SU_ROWS_PER_BEAT))
|
|
|
|
{{- if or .RowSync (.HasOp "sync")}}
|
|
{{- if .RowSync}}
|
|
%define SU_NUMSYNCS {{add1 .Song.Patch.NumSyncs}}
|
|
{{- else}}
|
|
%define SU_NUMSYNCS {{.Song.Patch.NumSyncs}}
|
|
{{- end}}
|
|
%define SU_SYNCBUFFER_LENGTH ((SU_LENGTH_IN_SAMPLES+255)>>8)*SU_NUMSYNCS
|
|
{{- end}}
|
|
|
|
{{- if .Output16Bit}}
|
|
%define SU_SAMPLE_SIZE 2
|
|
%define SU_SAMPLE_RANGE 32767.0
|
|
%define SU_SAMPLE_PCM16
|
|
{{- else}}
|
|
%define SU_SAMPLE_SIZE 4
|
|
%define SU_SAMPLE_RANGE 1.0
|
|
%define SU_SAMPLE_FLOAT
|
|
{{- end}}
|
|
|
|
{{- if or .RowSync (.HasOp "sync")}}
|
|
%define SU_SYNC
|
|
{{- end}}
|
|
|
|
_su_symbols:
|
|
%ifdef MANGLED
|
|
extern _su_render_song@4
|
|
%else ; MANGLED
|
|
extern su_render_song
|
|
%endif ; MANGLED
|
|
|
|
{{- if gt (.SampleOffsets | len) 0}}
|
|
extern _su_load_gmdls
|
|
%define SU_LOAD_GMDLS
|
|
{{- end}}
|
|
|
|
%endif ; PLAYER_INC
|