mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
First IWFFFF code (instrument handling)...
This commit is contained in:
parent
2e07583858
commit
e0741a5863
7 changed files with 920 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ sysinclude_HEADERS = asoundlib.h
|
|||
# This is the order they will be concatenated into asoundlib.h!
|
||||
#
|
||||
header_files=header.h version.h error.h control.h mixer.h pcm.h rawmidi.h \
|
||||
timer.h seq.h footer.h
|
||||
timer.h seq.h conv.h instr.h footer.h
|
||||
|
||||
noinst_HEADERS=$(header_files)
|
||||
|
||||
|
|
|
|||
37
include/conv.h
Normal file
37
include/conv.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/****************************************************************************
|
||||
* *
|
||||
* conv.h *
|
||||
* Binary Value Conversion *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef SND_LITTLE_ENDIAN
|
||||
|
||||
#define snd_host_to_LE_16(val) (val)
|
||||
#define snd_LE_to_host_16(val) (val)
|
||||
#define snd_host_to_LE_32(val) (val)
|
||||
#define snd_LE_to_host_32(val) (val)
|
||||
#define snd_host_to_BE_16(val) ((((val)>>8)&0xff)|(((val)<<8)&0xff00))
|
||||
#define snd_BE_to_host_16(val) snd_host_to_BE_16(val)
|
||||
#define snd_host_to_BE_32(val) ((((val)>>24)&0xff)|(((val)>>16)&0xff00)|\
|
||||
(((val)<<16)&0xff0000)|(((val)<<24)&0xff000000)
|
||||
#define snd_BE_to_host_32(val) snd_host_to_BE_32(val)
|
||||
|
||||
#else
|
||||
|
||||
#define snd_host_to_BE_16(val) (val)
|
||||
#define snd_BE_to_host_16(val) (val)
|
||||
#define snd_host_to_BE_16(val) (val)
|
||||
#define snd_BE_to_host_16(val) (val)
|
||||
#define snd_host_to_LE_16(val) ((((val)>>8)&0xff)|(((val)<<8)&0xff00))
|
||||
#define snd_LE_to_host_16(val) snd_host_to_BE_16(val)
|
||||
#define snd_host_to_LE_32(val) ((((val)>>24)&0xff)|(((val)>>16)&0xff00)|\
|
||||
(((val)<<16)&0xff0000)|(((val)<<24)&0xff000000)
|
||||
#define snd_LE_to_host_32(val) snd_host_to_BE_32(val)
|
||||
|
||||
#endif
|
||||
|
||||
27
include/instr.h
Normal file
27
include/instr.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/****************************************************************************
|
||||
* *
|
||||
* instr.h *
|
||||
* Instrument Interface *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
typedef void snd_instr_iwffff_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* InterWave FFFF support */
|
||||
int snd_instr_iwffff_open(void **handle, const char *name_fff, const char *name_dta);
|
||||
int snd_instr_iwffff_open_rom(void **handle, int card, int bank, int file);
|
||||
int snd_instr_iwffff_open_rom_file(void **handle, const char *name, int bank, int file);
|
||||
int snd_instr_iwffff_close(void *handle);
|
||||
int snd_instr_iwffff_load(void *handle, int bank, int prg, snd_instr_iwffff_t **iwffff);
|
||||
int snd_instr_iwffff_convert_to_stream(snd_instr_iwffff_t *iwffff, const char *name, snd_seq_instr_data_t **data, int *size);
|
||||
int snd_instr_iwffff_convert_from_stream(snd_seq_instr_data_t *data, int size, snd_instr_iwffff_t **iwffff);
|
||||
int snd_instr_iwffff_free(snd_instr_iwffff_t *iwffff);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue