Re: [Jack-Devel] Introducing delay into simple_client.c

PrevNext  Index
DateFri, 02 Nov 2012 08:24:38 -0400
From Paul Davis <[hidden] at linuxaudiosystems dot com>
ToJason Martyn <[hidden] at gmail dot com>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToJason Martyn Re: [Jack-Devel] Introducing delay into simple_client.c
Follow-UpJason Martyn Re: [Jack-Devel] Introducing delay into simple_client.c
On Fri, Nov 2, 2012 at 4:55 AM, Jason Martyn <[hidden]> wrote:

> Hello all,
>
> Thanks again for the help.  I've managed to put together an initial
> solution, though this doesn't utilize ringbuffers yet. It is as follows:
>    //Initialize audio buffer array
>     if( prev == NULL ){
>         prev = malloc(sizeof(jack_default_audio_sample_t *)*n);
>
>         for(i = 0; i < n; i++){
>             prev[i] = malloc(nframes*sizeof(jack_default_audio_sample_t));
>         }
>
>         i = 0;
>     }
>

you are not allowed to allocate memory inside the process() callback. this
must happen before you activate the client.
PrevNext  Index

1351859088.7774_0.ltw:2,a <CAFa_cKn=0Q02ghic=TJcSpnHktPK8WLdRhzzMLAPcL6wpY58dw at mail dot gmail dot com>