[yoshimi] Re: More firefighting :(
- From: Kristian Amlie <kristian@xxxxxxxxxx>
- To: yoshimi@xxxxxxxxxxxxx
- Date: Thu, 11 Feb 2016 19:09:29 +0100
On 11. feb. 2016 18:39, Will Godfrey wrote:
Hi Kristian
Nice to see you here again :)
I still spy on the mailing list from time to time! :-)
On Thu, 11 Feb 2016 15:57:48 +0100
Kristian Amlie <kristian@xxxxxxxxxx> wrote:
@@ -79,7 +79,7 @@ void Alienwah::out(float *smpsl, float *smpsr)
tmp = clfor * x + oldclfor * x1;
out = tmp * oldr[oldk];
- out.real() += (1 - abs(fb)) * smpsr[i] * pangainR;
+ out += (1 - abs(fb)) * smpsr[i] * pangainR;
oldr[oldk] = out;
float r = out.real() * 10.0f * (fb + 0.1f);
AFAICS, all values you add are real values, so this should be both
programmatically and mathematically correct!
This was historical code. I don't really understand the reason it only faulted
when out.real() was used on the LH side. I haven't come across the term
'complex' before, and generally try to avoid changing unknowns!
'complex' is a standard class type in the C++ libraries. In order for
the left hand side to be assignable, the function call 'real()' has to
return a reference value (denoted by '&' in C++), but I think the
library spec says specifically that it should not return a reference. So
it was probably a mistake from the gcc people to make it assignable in
the first place.
--
Kristian
Yoshimi source code is available from either:
http://sourceforge.net/projects/yoshimi
Or:
https://github.com/Yoshimi/yoshimi
Our list archive is at:
https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx
Other related posts: