timidity/instrum.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 17 Oct 2017 21:54:04 -0700
changeset 782 e7d3a8f73e88
parent 518 8bc9b5fd2aae
permissions -rw-r--r--
Merged over timidity from SDL_sound
This has changes to make it safe to load MIDI files as sound chunks and adds the ability to seek in MIDI files
Also cherry picked some patches from the original SDL_mixer timidity to fix buffer overruns and so forth.
slouken@0
     1
/*
slouken@782
     2
slouken@0
     3
    TiMidity -- Experimental MIDI to WAVE converter
slouken@0
     4
    Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
slouken@0
     5
slouken@0
     6
    This program is free software; you can redistribute it and/or modify
slouken@518
     7
    it under the terms of the Perl Artistic License, available in COPYING.
slouken@0
     8
slouken@782
     9
   instrum.h
slouken@245
    10
slouken@782
    11
   */
slouken@0
    12
slouken@0
    13
/* Bits in modes: */
slouken@0
    14
#define MODES_16BIT	(1<<0)
slouken@0
    15
#define MODES_UNSIGNED	(1<<1)
slouken@0
    16
#define MODES_LOOPING	(1<<2)
slouken@0
    17
#define MODES_PINGPONG	(1<<3)
slouken@0
    18
#define MODES_REVERSE	(1<<4)
slouken@0
    19
#define MODES_SUSTAIN	(1<<5)
slouken@0
    20
#define MODES_ENVELOPE	(1<<6)
slouken@0
    21
slouken@0
    22
/* A hack to delay instrument loading until after reading the
slouken@0
    23
   entire MIDI file. */
slouken@782
    24
#define MAGIC_LOAD_INSTRUMENT ((Instrument *) (-1))
slouken@0
    25
slouken@0
    26
#define SPECIAL_PROGRAM -1
slouken@0
    27
slouken@782
    28
extern int load_missing_instruments(MidiSong *song);
slouken@782
    29
extern void free_instruments(MidiSong *song);
slouken@782
    30
extern int set_default_instrument(MidiSong *song, char *name);