I'm trying to do smth like an avergage bitrate over a catalog. I tried looping all the mp3s and adding their bitrates to one variable, but if I want to display the result after the loop, the variable is empty? How to accomplish this task?
How to globalize the variable?
Next, I want to display certain information if the bitrate is VBR and other info if it's CBR. The question is, how to check if it's CBR or VBR?
Ok, now I can check the CBR/VBR status, but a new problem occured
I loop through the mp3 file sizes and measure their length. What I'd want to do is to get the longest length in a variable, but somehow it doesn't seem to work.
The code I use:
$loop(%_filename_ext%)$iflonger(%_file_size%,$get(length),$puts(length,$len(%_file_size%)),)$loopend()get(length)
The results are 7,7,7,7,7,7,7,8,7,7, but the variable somehow remembers the 7 and not the 8, at least when I try to use it outside the loop. Please tell me what am I missing here?