[Csnd-dev] Fwd: [openal] Buffer fill callback
Date | 2017-02-12 20:37 |
From | Anders Genell |
Subject | [Csnd-dev] Fwd: [openal] Buffer fill callback |
Dear devs! I posted a question to the OpenAL-soft list about possibility to essentially have AL (or rather alsa through AL in our case) handle rate of performKsmps() runs, which is what we ideally would like to do. I have included below the reply Chris Robinson who more or less is the sole maintainer of OpenAL-soft. As I am no programmer I could only partly interpret his reply, other than that it is not possible at the moment. I was just wondering if any of you gurus would care to spare a thought on the matter? Regards, Anders Vidarebefordrat brev:
|
Date | 2017-02-22 08:26 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] Fwd: [openal] Buffer fill callback |
There are several ways to do this. You will need 2 buffer sizes and 2 buffer indexes. You copy from the spout buffer to the host buffer. When you are at the end of spout you call csoundPerformKsmps and reset the spout index. When you are at the end of the host buffer you make Csound wait and return from the callback. See the CsoundVST code for an example. Regards, Mike On Feb 13, 2017 7:37 AM, "Anders Genell" <anders.genell@gmail.com> wrote:
|
Date | 2017-02-22 11:30 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] Fwd: [openal] Buffer fill callback |
Reading your emails again I see there isn't really a callback, but you can still use this idea by running Csound in another thread that runs until OpenAL polls ready. On Feb 22, 2017 7:26 PM, "Michael Gogins" <michael.gogins@gmail.com> wrote:
|