From: Vescovi Christophe (christophe.vescovi_at_wanadoo.fr)
Date: 01/18/04 10:04 EST
Message-ID: <400AA072.9020908@wanadoo.fr>
From: Vescovi Christophe <christophe.vescovi@wanadoo.fr>
Subject: [Ardour-users] bug in session panning information reading solved
Date: Sun, 18 Jan 2004 16:04:18 +0100
I have closed the mantis bug #221 concerning the problem that some of us
had that need changing the pan of stereo tracks when reloading a session
in order to have sound. You can simply apply this patch to
libs/ardour/io.cc :
> diff -B -u io.cc.old io.cc
--- io.cc.old 2004-01-16 16:45:14.000000000 +0100
+++ io.cc 2004-01-18 15:47:59.000000000 +0100
@@ -1583,7 +1583,7 @@
pos = 0;
opos = 0;
pans.clear ();
-
+ setlocale(LC_NUMERIC,"POSIX");
while ((pos = str.find_first_of (',', opos)) != string::npos) {
pans.push_back (atof (str.substr (opos, pos -
opos).c_str()));
opos = pos + 1;
@@ -1592,7 +1592,7 @@
if (opos < str.length()) {
pans.push_back ( atof (str.substr(opos).c_str()));
}
-
+ setlocale(LC_NUMERIC, "");
return pans.size();
}
-----------------------------
The bug was caused by the behaviour of atof that depends to the locale
setting. In that case the decimal point was not "." but "," since I'm
french so a pan value of 0.5 was read 0 since no decimal point was found
by atof !!
I was wondering why ardour develeppers were not disturbed by this (very
annoying for me) bug ... now I know !!
Regards,
Christophe
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Ardour-users mailing list
Ardour-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ardour-users
This archive was generated by hypermail 2.1.7 : 01/18/04 10:00 EST