Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ReplayGain & Run Command - help with programming needeed (Read 1604 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ReplayGain & Run Command - help with programming needeed

Hello

I am trying to write a batch to execute several commands on files

The one I am having problems with is

START foobar2000.exe /runcmd-playlist="ReplayGain/Scan selection as a single album"

I set Foobar up to let the ReplayGain Scan in silent mode, so it does not need any user-input and stores the found ReplayGain values in the file-tags right away.
it runs fine, but so far I found no way of telling the batch-script, that the scan has ended and the script can continue with other processes.

Setting a normal timeout-value in the script would not work, since scanning time depends on number of files and size (I scan flac files ranging from 1 to 30 minutes and 44.1/16 to 192/24, so scan time really varies hugely). So I need the script to somehow be told, that the analysis is done.

So my question is: how can the script find out without any user interaction, that foobar has finished the Replaygain-analysis?

Four your information:
I found some idea in another script, that does scan DynamicRange. As far as I understand it (I am by NO MEANS a programmer!!!!), this very script uses the fact, that for each file, the DR component creates a txt-file and the involves some sort of analyzing these files, counting the number of tracks and finally, by some sort of renaming-pattern ends up with having a dedicated file with all DR-values. The mere existence of this very file can be checked by the script, and so foobar can be closed and the script can continue.
I tried to adapt this script, but I could not get it to work...

So any input from your side is more than welcome - and please bear in mind: I am no programmer  !!!

ReplayGain & Run Command - help with programming needeed

Reply #1
start with /wait perhaps?
http://ss64.com/nt/start.html
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

ReplayGain & Run Command - help with programming needeed

Reply #2
That would wait for the termination of the foobar2000 process but how do you get foobar2000 to terminate when the ReplayGain scan is done? If foobar2000 was already running the new instance will only pass the command line parameters to the existing instance and terminate. If foobar2000 was not running the new instance will do the scan but it will not terminate when done.

This is why the script for the DR scan relies on observing the effects of the scan instead of getting direct feedback from foobar2000.

 

ReplayGain & Run Command - help with programming needeed

Reply #3
with custom foobar related command that will kill it (the instance) at the end of processing (if there is one).
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung