18
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...
İ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
@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.
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