Old 29th October 2007, 12:31   #1
sqrmax
Junior Member
 
Join Date: Nov 2004
Posts: 3
I wrote a DSP_SPS preset that worked fine with Winamp 5.25, but upon installing Winamp 5.5 it just does not work anymore. After much pain I tracked it down to how above() is (or rather is not) working... here is the source code for the preset. What it does is to slow down but using linear interpolation.

Init/format change:

prevLeft=0;
prevRight=0;
inputPosition=0;
outputPosition=0;


Slider change:
nothing


Per sample:

repeat=0;

inputPosition=inputPosition+1;
outputIncrement=slider1 * 0.5 + 0.5;
outputPosition=outputPosition+outputIncrement;

spl0=spl0+((spl0-prevLeft)*(inputPosition-outputPosition));
spl1=spl1+((spl1-prevRight)*(inputPosition-outputPosition));

nextOutputPosition=outputPosition+outputIncrement;
if(above(inputPosition, nextOutputPosition),
exec2(assign(repeat,1), assign(inputPosition,inputPosition-1)),
assign(repeat,0));

assign(prevLeft,spl0);
assign(prevRight,spl1);

if(above(inputPosition,1000),
exec2(assign(inputPosition,inputPosition-500),assign(outputPosition,outputPosition-500)),
assign(inputPosition,inputPosition));


Also... I have 6 different versions which all used to work. None of them does, although some of them just fail to do anything while others just output silence. ???...

I reverted to the old .dll... it works fine now, but the oscilloscope displays this weird behavior by which the right half of it stays flat most of the time. Maybe the bug is related to the oscilloscope not moving slower as in older versions?

Thanks,
Andres.

PS: sorry for not realizing about the post edits .

Last edited by sqrmax; 29th October 2007 at 14:05.
sqrmax is offline   Reply With Quote
Old 29th October 2007, 20:09   #2
ujay
Forum King
 
ujay's Avatar
 
Join Date: Jul 2001
Location: London
Posts: 6,072
@ sqrmax

Try changing all variable names to 7 chars. or less.

Not sure if this is officially documented anywhere, but the change took place somewhere around v5.3

UJ
ujay is offline   Reply With Quote
Old 30th October 2007, 11:15   #3
sqrmax
Junior Member
 
Join Date: Nov 2004
Posts: 3
Hmmm... none of the names collide when only their first 7 letters are considered, but the preset works with the new DLL now (that names have been shortened). ???...

Also, why was this limitation introduced? It's not because the code window is small, right?

Thanks,
Andres.


Quote:
Originally posted by ujay
@ sqrmax

Try changing all variable names to 7 chars. or less.

Not sure if this is officially documented anywhere, but the change took place somewhere around v5.3

UJ

Last edited by sqrmax; 30th October 2007 at 13:26.
sqrmax is offline   Reply With Quote
Old 30th October 2007, 11:58   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally posted by sqrmax
Also, why was this limitation introduced? It's not because the code window is small, right?
not sure, it seems to have stemmed for some change with the compiler we think at the time. if there is time it will be looked into for 5.51 but there's no guarantees the time will be found to resolve it (if it's not a simple fix that is)

-daz
DrO is offline   Reply With Quote
Old 30th October 2007, 13:24   #5
sqrmax
Junior Member
 
Join Date: Nov 2004
Posts: 3
Thanks you .
Andres.

Quote:
Originally posted by DrO
not sure, it seems to have stemmed for some change with the compiler we think at the time. if there is time it will be looked into for 5.51 but there's no guarantees the time will be found to resolve it (if it's not a simple fix that is)

-daz
sqrmax is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Bug Reports

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump