Re: [LAD] Mixing audio: Implementing pan and balance

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Sunday, March 24, 2013 - 8:07 am

On 03/23/2013 06:05 PM, Raphaël BOLLEN wrote:

This patch solves the problem for me.

--- /home/rapha/Downloads/kokkinizita/zita-mu1-0.2.0/source/jclient.cc.orig
+++ /home/rapha/Downloads/kokkinizita/zita-mu1-0.2.0/source/jclient.cc
@@ -207,38 +207,43 @@
{
k = prepare (frames);

- q0 = selout [0];
- q1 = selout [1];
- for (i = 0; i < 4; i++)
- {
- m = _inpstat [i].state ();
- if (m)
- {
- p0 = moninp [2 * i];
- p1 = moninp [2 * i + 1];
- if (m == DelayAct::ON)
- {
- for (j = 0; j < k; j++)
- {
- q0 [j] += p0 [j];
- q1 [j] += p1 [j];
- }
- }
- else
- {
- g = _ipg [i];
- t = (m == DelayAct::UP) ? 1.0f : 0.0f;
- d = (t - g) / _frcnt;
- for (j = 0; j < k; j++)
- {
- g += d;
- q0 [j] += g * p0 [j];
- q1 [j] += g * p1 [j];
- }
- _ipg [i] = g;
- }
- }
- }
+ q0 = selout [0];
+ q1 = selout [1];
+ for (i = 0; i < 4; i++)
+ {
+ m = _inpstat [i].state ();
+ p0 = moninp [2 * i];
+ p1 = moninp [2 * i + 1];
+ for (j = 0; j < k; j++)
+ {
+ p0[j] += 1e-20;
+ p1[j] += 1e-20;
+ }
+ if (m)
+ {
+ if (m == DelayAct::ON)
+ {
+ for (j = 0; j < k; j++)
+ {
+ q0 [j] += p0 [j];
+ q1 [j] += p1 [j];
+ }
+ }
+ else
+ {
+ g = _ipg [i];
+ t = (m == DelayAct::UP) ? 1.0f : 0.0f;
+ d = (t - g) / _frcnt;
+ for (j = 0; j < k; j++)
+ {
+ g += d;
+ q0 [j] += g * p0 [j];
+ q1 [j] += g * p1 [j];
+ }
+ _ipg [i] = g;
+ }
+ }
+ }

_kmdsp [0].process (q0, k);
_kmdsp [1].process (q1, k);

Cheers

--
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] Mixing audio: Implementing pan and balance, Tim E. Real, (Tue Mar 12, 5:23 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Fons Adriaensen, (Tue Mar 12, 9:56 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Tue Mar 12, 8:25 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Fons Adriaensen, (Tue Mar 12, 9:22 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Wed Mar 13, 8:16 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Wed Mar 13, 11:34 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Tue Mar 12, 8:28 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Tue Mar 12, 9:15 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Geoff Beasley, (Tue Mar 12, 9:41 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Tue Mar 12, 7:08 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Jörn Nettingsmeier, (Thu Mar 14, 10:42 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Fri Mar 15, 11:57 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Thu Mar 14, 11:37 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Jörn Nettingsmeier, (Thu Mar 14, 6:50 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Ralf Mardorf, (Sat Mar 16, 10:17 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Fred Gleason, (Sat Mar 16, 11:51 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Ricardus Vincente, (Sat Mar 16, 7:47 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Sun Mar 17, 10:54 am)
[LAD] OT: Mixing audio: Implementing pan and balance, Ralf Mardorf, (Sat Mar 16, 2:20 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Sat Mar 16, 1:25 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Fons Adriaensen, (Sat Mar 16, 6:23 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Raphaël BOLLEN, (Sat Mar 23, 5:05 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Raphaël BOLLEN, (Sun Mar 24, 8:07 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Raphaël BOLLEN, (Sun Mar 24, 8:46 am)
Re: [LAD] Mixing audio: Implementing pan and balance, hermann meyer, (Sun Mar 24, 9:50 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Raphaël BOLLEN, (Sun Mar 24, 10:10 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Jörn Nettingsmeier, (Sun Mar 24, 12:57 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Fons Adriaensen, (Sun Mar 24, 11:57 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Raphaël BOLLEN, (Sun Mar 24, 1:01 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Fons Adriaensen, (Sun Mar 24, 3:11 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Raphaël BOLLEN, (Sun Mar 24, 4:18 pm)
[LAD] zita-mu1 denormals, Fons Adriaensen, (Wed Mar 27, 11:48 am)
Re: [LAD] zita-mu1 denormals, Raphaël BOLLEN, (Wed Mar 27, 2:21 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Ralf Mardorf, (Sat Mar 16, 8:28 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Ralf Mardorf, (Sat Mar 16, 10:21 am)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Thu Mar 14, 7:01 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Tue Mar 12, 7:21 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Paul Davis, (Tue Mar 12, 7:13 pm)
Re: [LAD] Mixing audio: Implementing pan and balance, Tim E. Real, (Tue Mar 12, 7:44 pm)