/[svn]/liblscp/trunk/src/common.c
ViewVC logotype

Diff of /liblscp/trunk/src/common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 945 by capela, Sun Sep 24 12:55:48 2006 UTC revision 946 by capela, Mon Nov 27 18:33:02 2006 UTC
# Line 906  int lscp_param_concat ( char *pszBuffer, Line 906  int lscp_param_concat ( char *pszBuffer,
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

Legend:
Removed from v.945  
changed lines
  Added in v.946

  ViewVC Help
Powered by ViewVC