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.
Recent Posts
11
foobar2000 mobile / Re: Stop playback after each track in Foobar2000 mobile
Last post by pcetp -
I think the 'One track' function is designed to play the same track again and not to move through a playlist.

I opened a playlist with 4 tracks: track1.mp3, track2.mp3, track3.mp3, track4.mp3
After playback of track 1 a black and white screen with playback controls is displayed (the cover picture for the mp3 track is not visible in this screen).
The controls shown are like:  <<   >   >>

After playback foobar2000 mobile always wants to go back to the beginning of track 1.
So after track 1 you have to click on the right button 2 times to get to track 2.
After track 2 you have to click on the right button 3 times to get to track 3.
And after track 3 you have to click on the right button 4 times to get to track 4.

I work with playlists a lot so this is not very user friendly.

I think the solution I mentioned in my first post with "Stop playback after current track" and the option "Reset the above when stopping." would be much more user friendly.




15
General - (fb2k) / Any way to query foobar2000 via CLI and get structured data?
Last post by Coreda -
Not sure if a component exists that handles such a thing that I've just overlooked but was looking for a way to use foobar2000's query syntax to filter a library to certain items then get structured data about it (ideally JSON) in return.

Use case would be for being able to display an external-to-fb2k display of artists/songs/recently played.

Would be similarly useful if there were a way to also trigger playback based on a query via CLI, though looking at the CLI reference on the wiki I'm uncertain if this would be achievable via run cmd or such since afaict it only allows for menu-based commands.

Thought I'd ask to see what might be feasible.
18
Other Lossy Codecs / Re: lossyWAV 1.4.2 Development (was 1.5.0)
Last post by Hakan Abbas -
Lossywav support was added to HALAC. In version 0.2.9, it will be shared with other arrangements. The Lossywav format is detected from the "fact" keyword in Header. And in this case a different mode is switched. If the "-fast" parameter is used, it is disabled.
However, I am currently sharing Encoder and Decoder, which is available for test. The results are not bad for starting in terms of speed/compression ratio. Encode speed is considered the same as HALAC Normal. However, the decode speed is much more (prediction process was not used)! Rice coding has not been used yet and the block size is 2048.
All other codecs are at the highest compression level in the default settings. And single thread results...
Code: [Select]
İskender Paydaş - Zamansız Şarkılar (2011)
10 Tracks, 469.385.056 bytes, i7 3770k, 16 gb ram, 240 gb ssd.
Wma      :  19.06,  11.26, 174,956,882
Flac     :  18.76,   4.73, 175,805,836
Halac    :   2.37,   1.81, 191,318,610
Tak      :  20.27,   7.18, 193,906,253
Wavpack  :  29.40,  16.38, 230,017,269
OptimFrog: 184.12, 111.69, 254,001,399
Monkeys  :  59.42,  63.83, 325,501,439
Alac     :  18.83,   8.87, 340,827,308
19
3rd Party Plugins - (fb2k) / Re: JScript Panel script discussion/help
Last post by Defender -
@marc2k3

Lately I started experimenting a bit with external outputdevices like bluetooth headphones/jbl charge, which I can select with a (modified) JS3 output button.
Works fine.

When output is set to such a device and the external bluetooth output device is switched off the JS3 panel with the output device button did crash. So I wrote some extra lines to prevent the crashing by automatically setting the output device to the second found output (first one being Null Output).
This kinda works since the JS3 panel does not crash anymore, but upon such an event (switching off current output) foobar responds with stopping playback and opening it's preferences page to Preferences/Playback/Output already preset to the second output (as intended), but I still have to click OK and start playback manually.

Code: [Select]
buttons.update = function () {
...
var str = fb.GetOutputDevices();
var arr = JSON.parse(str);
var active = -1;
for (var i = 0; i < arr.length; i++) {
if (arr[i].active) active = i;
if (arr[i].name.indexOf("[exclusive]") > 0) last_exclusive = i;
}
if (active == -1) { // OutputDevice has been switched OFF
active = 1;
fb.RunMainMenuCommand('Playback/Device/' + arr[1].name); // Force second OutputDevice
}
switch (true) {
case active == 0:
var img_odev_normal = utils.LoadImage(imgPath + 'OutputDevice-NULL-normal.png');
var img_odev_hover = utils.LoadImage(imgPath + 'OutputDevice-NULL-hover.png');
break;
case active == 1:
var img_odev_normal = utils.LoadImage(imgPath + 'OutputDevice-Default-normal.png');
var img_odev_hover = utils.LoadImage(imgPath + 'OutputDevice-Default-hover.png');
break;
case arr[active].name.indexOf("[exclusive]") > 0:
var img_odev_normal = utils.LoadImage(imgPath + 'OutputDevice-Exclusive-normal.png');
var img_odev_hover = utils.LoadImage(imgPath + 'OutputDevice-Exclusive-hover.png');
break;
case active > last_exclusive:
var img_odev_normal = utils.LoadImage(imgPath + 'OutputDevice-External-normal.png');
var img_odev_hover = utils.LoadImage(imgPath + 'OutputDevice-External-hover.png');
break;
default:
var img_odev_normal = utils.LoadImage(imgPath + 'OutputDevice-Other-active.png');
var img_odev_hover = utils.LoadImage(imgPath + 'OutputDevice-Other-hover.png');
}
...
}

function on_output_device_changed() {
var str = fb.GetOutputDevices();
var arr = JSON.parse(str);
var active = -1;
var last_exclusive = -1;
for (var i = 0; i < arr.length; i++) {
if (arr[i].active) active = i;
if (arr[i].name.indexOf("[exclusive]") > 0) last_exclusive = i;
}
if (active == -1) {
active = 1;
fb.RunMainMenuCommand('Playback/Device/' + arr[1].name);
}

buttons.update();
window.Repaint();
}

I even copied this bit of code to the on_output_device_changed() function itself, but same behavior.

Is there a way to prevent opening of the preferences page when current output device is switched off?

NB. Preferably I'd like to detect the output not being available anymore, switching to second outputdevice and continue playing