No that's not reliable. It seems to show the location from which it was launched rather than where the executable is.Robert J. H. wrote:How aboutCode: Select all
(print *default-sf-dir*)
A more accessible way to set up latency correction
Re: A more accessible way to set up latency correction
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: A more accessible way to set up latency correction
Matthew, I split your last post to here http://forum.audacityteam.org/viewtopic ... 20&t=75908 as it is really a different proposal to what is being discussed here.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: A more accessible way to set up latency correction
This is pretty easy for a built-in effect but without patching Nyquist code it's probably not available to an external plug-in. But in reality you don't need all of that from a built-in effect because there's a wxWidgets function which returns the configuration directory no matter where it is.steve wrote:I don't know of any reliable way to find the directory from which Audacity is running (which I think would be required to find a Portable Settings folder). Let me know if you find one
Re: A more accessible way to set up latency correction
Thanks Edgar. That's going on the Nyquist wish listEdgar wrote:But in reality you don't need all of that from a built-in effect because there's a wxWidgets function which returns the configuration directory no matter where it is.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Robert J. H.
- Posts: 3633
- Joined: Thu May 31, 2012 8:33 am
- Operating System: Windows 10
Re: A more accessible way to set up latency correction
What do you mean by launched? I launch it via link on the desktop, but it returns the right directory.steve wrote:No that's not reliable. It seems to show the location from which it was launched rather than where the executable is.Robert J. H. wrote:How aboutCode: Select all
(print *default-sf-dir*)
Another way but probably giving the same result is:
Code: Select all
(print (setdir ""))Re: A more accessible way to set up latency correction
As an example, if you open the Windows Command Prompt, the prompt will indicate the current directory. If you then launch Audacity from the Command Prompt, *default-sf-dir* will indicate the same directory as was shown in the Command Prompt. If you then close Audacity, navigate to a new directory and relaunch Audacity, *default-sf-dir* will indicate the new location.Robert J. H. wrote:What do you mean by launched?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Robert J. H.
- Posts: 3633
- Joined: Thu May 31, 2012 8:33 am
- Operating System: Windows 10
Re: A more accessible way to set up latency correction
I guess that's the Linux way of doing things...steve wrote:As an example, if you open the Windows Command Prompt, the prompt will indicate the current directory. If you then launch Audacity from the Command Prompt, *default-sf-dir* will indicate the same directory as was shown in the Command Prompt. If you then close Audacity, navigate to a new directory and relaunch Audacity, *default-sf-dir* will indicate the new location.Robert J. H. wrote:What do you mean by launched?
After all, reading the current Latency Correction isn't that important. It is rather a question of "Please type the following number in the Latency Correction box" or to tell the user to add or substract that value--this leads perhaps to confusion. For example, if the current value is -100 and he/she should substract 50, will there be afterwards -150 or -50?
Anyway, The algorithm seems to work fine. There are 10 Accuracy levels from 1 ms resolution to 0.1 ms (which needs 100 times more calculations). Level 5 is actually enough, it returns a correction of -31.6 ms on my system (didn't know that decimal places work).
A Recording done with this setting aligns almost perfect. The test signals were click track (default setting), noise, chirp and so on. The returned value is practically always identical--if the test signal hasn't a decaying character (e.g. Risset Drum).
Recording with WASAPI is a special case though. Since my Mixer does not work, I won't be able to test other sources.
By the way, does anyone know why positive values are allowed as Latency Correction?
Re: A more accessible way to set up latency correction
That was on Windows XPRobert J. H. wrote:I guess that's the Linux way of doing things...
Not essential, but easier for the user.Robert J. H. wrote:After all, reading the current Latency Correction isn't that important.
How about providing options for "standard installation" and "Portable Installation", where the former checks in the default location for audacity.cfg and the latter requires the user to enter the location of their Portable Settings folder? If the user has created a Portable Settings folder then they should know where it is.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: A more accessible way to set up latency correction
The PortAudio library we use does of course have a simplistic feature that tries to do that. It works fairly well with MME host in Device Toolbar but not with Windows DirectSound, which was the reason the automatic adjustment was turned off.steve wrote:The next best thing would be if Audacity automatically knew how much round trip latency there would be, then Audacity could automatically adjust for it.
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
-
waxcylinder
- Forum Staff
- Posts: 14684
- Joined: Tue Jul 31, 2007 11:03 am
- Operating System: Windows 10
Re: A more accessible way to set up latency correction
BUMP: can I just archive this thread - or is there an idea that can be expressed succinctly that I could transfer to Wiki>PFR with a link back to the archived thread. Advice please.
Peter.
Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *