VirtualMIDISynth 2.0.1 ignores change of default output device

Posts: 1
Joined: August 20, 2017 - 18:22
VirtualMIDISynth 2.0.1 ignores change of default output device

Hi,

today I was switching between two sound output devices, INTEL Display Audio (HDMI) and a  headset connected with USB, using the windows built-in sound preferences dialog (sound/playback devices).
It looks like VirtualMIDISynth ignores such a change in the default output device, because MIDI was still playing on device 1 while default output was changed to device 2 and vice versa. 
With dosbox running a game with digital sound effects and general music, the midi music never switched between the headset and the loudspeakers.
A workaround would be to change the output device in virtualMIDISynth preferences dialog from default to  either headset or Intel Audio and back again to default.

VirtualMIDISynth should not ignore the change of default output device if  output device is configured to 'default' in VirtualMIDIsynth preferences.
This also happen if VirtualMIDISynth device is free (unused) and opened by a program after default sound device was changed.

I can reproduce this on Windows 10 (1511)  and windows 7.

Posts: 1125
Joined: March 25, 2012 - 01:19
Re: VirtualMIDISynth 2.0.1 ignores change of default output device

The output device configuration is read at VMS start; if you configure , then the default device is detected, initialized and used till VMS is running.
The only exception is when user changes VMS configured output device (through the Options tab): in this case VMS is reinitialized and the new device is used.

This is a good suggestion but I honestly don't know how much work is needed to implement auto-detection.
It will involve registering to some system-wide event, need to investigate a bit.

As a side note, I'm working on a new feature that will allow to configure a different output device for each virtual MIDI device.
This way you could set VMS#1 to use AudioDevice#X and VMS#2 to use AudioDevice#Y.
This could complicate things a little...

Posts: 14
Joined: September 25, 2013 - 16:38
Re: VirtualMIDISynth 2.0.1 ignores change of default output device

Hi,

If you want to follow the default output device using Bass there is an option for it:

BASS_SetConfig(BASS_CONFIG_DEV_DEFAULT, 1) ;

Documenatation:

http://www.un4seen.com/doc/#bass/BASS_CONFIG_DEV_DEFAULT.html

But be aware that the latest official bulid of Bass has a bug related to this option , so you need the latest (beta) build of bass to avoid it:

http://www.un4seen.com/forum/?topic=17767.msg124732#msg124732

Best Reagrds:

Falco

Posts: 1125
Joined: March 25, 2012 - 01:19
Re: VirtualMIDISynth 2.0.1 ignores change of default output device

@falcosoft: thank you very much for your suggestion.
BASS is moving so fast that is really difficult for me to keep updated...

Anyway, a quick read of BASS documentation shown something I'm worried about:
"When the "Default" device is used, the BASS_SetVolume and BASS_GetVolume functions work a bit differently to usual; they deal with the "session" volume, which only affects the current process's output on the device, rather than the device's volume."

Need to check it out, but it seeems way easyer than implementing device change detection from scratch.

warning

Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.