diff --git a/src/engine/platform/c140.cpp b/src/engine/platform/c140.cpp index c83a93247..693f462c7 100644 --- a/src/engine/platform/c140.cpp +++ b/src/engine/platform/c140.cpp @@ -76,10 +76,10 @@ void DivPlatformC140::acquire_219(short** buf, size_t len) { writes.pop(); } - c219_tick(&c219, 1); + c219_tick(&c219,1); // scale as 16bit - c219.lout >>= 10; - c219.rout >>= 10; + c219.lout>>=10; + c219.rout>>=10; if (c219.lout<-32768) c219.lout=-32768; if (c219.lout>32767) c219.lout=32767; @@ -91,7 +91,11 @@ void DivPlatformC140::acquire_219(short** buf, size_t len) { buf[1][h]=c219.rout; for (int i=0; idata[oscBuf[i]->needle++]=(c219.voice[i].lout+c219.voice[i].rout)>>10; + if (c219.voice[i].inv_lout) { + oscBuf[i]->data[oscBuf[i]->needle++]=(c219.voice[i].lout-c219.voice[i].rout)>>10; + } else { + oscBuf[i]->data[oscBuf[i]->needle++]=(c219.voice[i].lout+c219.voice[i].rout)>>10; + } } } } diff --git a/src/gui/render/renderGL.cpp b/src/gui/render/renderGL.cpp index d5cda85d2..1950e2431 100644 --- a/src/gui/render/renderGL.cpp +++ b/src/gui/render/renderGL.cpp @@ -108,7 +108,7 @@ const char* sh_oscRender_srcF= " float x1 = uv.x-uAdvance;\n" " float x2 = uv.x;\n" " float x3 = uv.x+uAdvance;\n" - " float val1 = texture2D(oscVal,vec2(x2,1.0)).x;\n" + " float val1 = texture2D(oscVal,vec2(x1,1.0)).x;\n" " float val2 = texture2D(oscVal,vec2(x2,1.0)).x;\n" " float val3 = texture2D(oscVal,vec2(x3,1.0)).x;\n" " float valmax = max(max(val1,val2),val3);\n" @@ -121,7 +121,7 @@ const char* sh_oscRender_srcF= " alpha=fur_fragCoord.y-valmin*uResolution.y*0.5+uLineWidth*0.5;\n" " }\n" " if (slope>1.0) {\n" - " gl_FragColor = vec4(0.0,1.0,0.0,uColor.w*clamp(alpha,0.0,1.0));\n" + " gl_FragColor = vec4(uColor.xyz,uColor.w*clamp(alpha,0.0,1.0));\n" " } else {\n" " gl_FragColor = vec4(uColor.xyz,uColor.w*clamp(alpha,0.0,1.0));\n" " }\n" @@ -169,7 +169,7 @@ const char* sh_oscRender_srcF= " float x1 = uv.x-uAdvance;\n" " float x2 = uv.x;\n" " float x3 = uv.x+uAdvance;\n" - " float val1 = texture(oscVal,x2).x;\n" + " float val1 = texture(oscVal,x1).x;\n" " float val2 = texture(oscVal,x2).x;\n" " float val3 = texture(oscVal,x3).x;\n" " float valmax = max(max(val1,val2),val3);\n"