openbsd-ports/audio/soundtracker/patches/patch-app_xm_c
espie 2d6f9f9727 soundtracker, from maintainer.
A music editing program, in the grand tradition of amiga tracker programs.
2002-02-05 18:04:10 +00:00

25 lines
974 B
Plaintext

$OpenBSD: patch-app_xm_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $
--- app/xm.c.orig Mon Feb 4 04:08:11 2002
+++ app/xm.c Mon Feb 4 04:39:22 2002
@@ -760,7 +760,8 @@ xm_init_locks (XM *xm)
for(i = 0; i < sizeof(xm->instruments) / sizeof(xm->instruments[0]); i++) {
STInstrument *ins = &xm->instruments[i];
for(j = 0; j < sizeof(ins->samples) / sizeof(ins->samples[0]); j++) {
- ins->samples[j].sample.lock = g_mutex_new();
+ ins->samples[j].sample.lock = malloc(sizeof(pthread_mutex_t));
+ pthread_mutex_init(ins->samples[j].sample.lock, NULL);
}
}
}
@@ -1089,7 +1090,9 @@ XM_Free (XM *xm)
STInstrument *ins = &xm->instruments[i];
st_clean_instrument(ins, NULL);
for(j = 0; j < sizeof(ins->samples) / sizeof(ins->samples[0]); j++) {
- g_mutex_free(ins->samples[j].sample.lock);
+ pthread_mutex_destroy(ins->samples[j].sample.lock);
+ free(ins->samples[j].sample.lock);
+ ins->samples[j].sample.lock = NULL;
}
}