[LAD] jack ringbuffer usage

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Monday, April 8, 2013 - 11:45 am

Hi,

I'm trying to use jack's ringbuffer like this:

- initialization:

jack_ringbuffer_t * ringBuf = jack_ringbuffer_create(sizeof(jack_default_audio_sample_t) * (1<<16));
memset (ringBuf->buf, 0, ringBuf->size) ;

- jack process callback:

jack_default_audio_sample_t buf[numChannels];
size_t read_cnt = 0;
for (_frameCounter=0; _frameCounter < nFrames; _frameCounter++) {
read_cnt = jack_ringbuffer_read(ringBuf, (void*)buf, sample_size * numChannels);
^^^^^^^^^ error
}

but g++ won't compile the code and report this

error: invalid conversion from 'void*' to 'char*' [-fpermissive]
/usr/local/include/jack/ringbuffer.h:136: error: initializing argument 2 of 'size_t
jack_ringbuffer_read(jack_ringbuffer_t*, char*, size_t)' [-fpermissive]

passing -fpermissive gets the program running but is it the right way to do it?

Thanks

--
Raphaël.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] jack ringbuffer usage, Raphaël BOLLEN, (Mon Apr 8, 11:45 am)
Re: [LAD] jack ringbuffer usage, Harry van Haaren, (Mon Apr 8, 11:51 am)
Re: [LAD] jack ringbuffer usage, Jörn Nettingsmeier, (Thu Apr 11, 6:23 pm)
Re: [LAD] jack ringbuffer usage, Raphaël BOLLEN, (Mon Apr 8, 12:02 pm)
Re: [LAD] jack ringbuffer usage, Harry van Haaren, (Mon Apr 8, 12:09 pm)
Re: [LAD] jack ringbuffer usage, Raphaël BOLLEN, (Mon Apr 8, 12:23 pm)
Re: [LAD] jack ringbuffer usage, Paul Davis, (Mon Apr 8, 1:29 pm)
Re: [LAD] jack ringbuffer usage, Raphaël BOLLEN, (Mon Apr 8, 3:27 pm)
Re: [LAD] jack ringbuffer usage, Jörn Nettingsmeier, (Thu Apr 11, 9:35 pm)
Re: [LAD] jack ringbuffer usage, Raphaël BOLLEN, (Fri Apr 12, 8:17 am)
Re: [LAD] jack ringbuffer usage, Adrian Knoth, (Mon Apr 8, 12:24 pm)
Re: [LAD] jack ringbuffer usage, Raphaël BOLLEN, (Mon Apr 8, 1:16 pm)
Re: [LAD] jack ringbuffer usage, Adrian Knoth, (Mon Apr 8, 1:49 pm)
Re: [LAD] jack ringbuffer usage, Raphaël BOLLEN, (Mon Apr 8, 3:31 pm)
Re: [LAD] jack ringbuffer usage, Adrian Knoth, (Mon Apr 8, 3:48 pm)