aboutsummaryrefslogtreecommitdiff
path: root/audio/jackaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/jackaudio.c')
-rw-r--r--audio/jackaudio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/jackaudio.c b/audio/jackaudio.c
index bf757250b5..5bdf3d7a78 100644
--- a/audio/jackaudio.c
+++ b/audio/jackaudio.c
@@ -97,9 +97,9 @@ static void qjack_buffer_create(QJackBuffer *buffer, int channels, int frames)
buffer->used = 0;
buffer->rptr = 0;
buffer->wptr = 0;
- buffer->data = g_malloc(channels * sizeof(float *));
+ buffer->data = g_new(float *, channels);
for (int i = 0; i < channels; ++i) {
- buffer->data[i] = g_malloc(frames * sizeof(float));
+ buffer->data[i] = g_new(float, frames);
}
}
@@ -453,7 +453,7 @@ static int qjack_client_init(QJackClient *c)
jack_on_shutdown(c->client, qjack_shutdown, c);
/* allocate and register the ports */
- c->port = g_malloc(sizeof(jack_port_t *) * c->nchannels);
+ c->port = g_new(jack_port_t *, c->nchannels);
for (int i = 0; i < c->nchannels; ++i) {
char port_name[16];