906 |
} |
} |
907 |
|
|
908 |
|
|
909 |
|
//------------------------------------------------------------------------- |
910 |
|
// MIDI instrument info struct helper functions. |
911 |
|
|
912 |
|
void lscp_midi_instrument_info_init ( lscp_midi_instrument_info_t *pInstrInfo ) |
913 |
|
{ |
914 |
|
pInstrInfo->name = NULL; |
915 |
|
pInstrInfo->engine_name = NULL; |
916 |
|
pInstrInfo->instrument_file = NULL; |
917 |
|
pInstrInfo->instrument_nr = 0; |
918 |
|
pInstrInfo->instrument_name = NULL; |
919 |
|
pInstrInfo->load_mode = LSCP_LOAD_DEFAULT; |
920 |
|
pInstrInfo->volume = 0.0; |
921 |
|
} |
922 |
|
|
923 |
|
void lscp_midi_instrument_info_free ( lscp_midi_instrument_info_t *pInstrInfo ) |
924 |
|
{ |
925 |
|
if (pInstrInfo->name) |
926 |
|
free(pInstrInfo->name); |
927 |
|
if (pInstrInfo->engine_name) |
928 |
|
free(pInstrInfo->engine_name); |
929 |
|
if (pInstrInfo->instrument_file) |
930 |
|
free(pInstrInfo->instrument_file); |
931 |
|
if (pInstrInfo->instrument_name) |
932 |
|
free(pInstrInfo->instrument_name); |
933 |
|
} |
934 |
|
|
935 |
|
void lscp_midi_instrument_info_reset ( lscp_midi_instrument_info_t *pInstrInfo ) |
936 |
|
{ |
937 |
|
lscp_midi_instrument_info_free(pInstrInfo); |
938 |
|
lscp_midi_instrument_info_init(pInstrInfo); |
939 |
|
} |
940 |
|
|
941 |
|
|
942 |
// end of common.c |
// end of common.c |