Beispiel #1
0
PmError Pm_Terminate( void ) {
    if (pm_initialized) {
        pm_term();
        pm_initialized = FALSE;
    }
    return pmNoError;
}
Beispiel #2
0
/* pm_exit is called when the program exits.
   It calls pm_term to make sure PortMidi is properly closed.
   If DEBUG is on, we prompt for input to avoid losing error messages.
 */
static void pm_exit(void) {
    pm_term();
//#ifdef DEBUG
//#define STRING_MAX 80
//    {
//        char line[STRING_MAX];
//        printf("Type ENTER...\n");
//        /* note, w/o this prompting, client console application can not see one
//           of its errors before closing. */
//        fgets(line, STRING_MAX, stdin);
//    }
//#endif
}
Beispiel #3
0
PMEXPORT PmError Pm_Terminate( void ) {
    if (pm_initialized) {
        pm_term();
        // if there are no devices, descriptors might still be NULL
        if (descriptors != NULL) {
            free(descriptors);
            descriptors = NULL;
        }
        pm_descriptor_index = 0;
        pm_descriptor_max = 0;
        pm_initialized = FALSE;
    }
    return pmNoError;
}