Author Topic: WASAPI in Event mode???  (Read 25925 times)

vincent kars

  • Sr. Member
  • ****
  • Posts: 445
Couldn't find this setting in MusicBee3Settings.ini
MusicBeeSettings.old contains


<PlayerWasapiEventMode>1</PlayerWasapiEventMode>


Is is deliberated not to include this setting in MusicBee3Settings?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34363
in 3.1 event mode can be enabled via the Player preferences when WASAPI output is selected.
If you want to manipulate the buffer using for event mode, you need to edit the settings file while MB is not running
look for: PlayerWasapiEventModeBuffer
its value is in milliseconds

vincent kars

  • Sr. Member
  • ****
  • Posts: 445
Nice

Using 3.0.5864 the Configure button is disabled when selecting WASAPI
What am I missing?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34363
It does have a configuration dialog implemented ie. if you want to change the buffer its a manual edit.

I would be interested in feedback as to whether it works ok as i have had some comments its not working
Last Edit: August 11, 2017, 06:53:58 AM by Steven

vincent kars

  • Sr. Member
  • ****
  • Posts: 445
Took a while before I found out that my shortcut was pointing to 3 instead of 3.1
Anyway, using 3.1.6427 I use WASAPI with Event mode checked.

Using Toslink into a Benchmark DAC1 everything played fine.
Fooled around with buffer settings.

<PlayerWasapiEventModeBuffer>8</PlayerWasapiEventModeBuffer> played fine.
Lower yielded a Bass lib error

Switched to USB
Restart MusicBee

<PlayerWasapiEventModeBuffer>8</PlayerWasapiEventModeBuffer>
With this buffer setting the audio is completely garbled.
Set the buffer to its default value (0) and USB played fine as well.

Maybe USB is a bit more vulnerable to buffer size.
Otherwise everything plays fine here.

Will use this setting and report back if I hear anything weird.


hiccup

  • Sr. Member
  • ****
  • Posts: 7893
Thanks for your input on this issue Vincent.

Looking at your Benchmark DAC1, there are two things that set it apart from my dac (and probably Bee-liever's too)

First of all it has a USB1.1 interface, not USB2.0.
That shouldn't be an issue for the sound quality, but it does make a difference for the drivers.

And what is certainly different, it is said here that it communicates with a PC in synchronous mode. Not a-synchronous:
https://www.stereophile.com/headphones/108bench/index.html

They do some internal wizardry that is supposed to result a-synchronous like processing, but the connection with the pc is synchronous.

So that makes your dac a bit of an odd beast, and not comparable with most dac's that are being sold today.
And it will most certainly be responding very differently to MB's event mode settings.

Hopefully some other MusicBee members with dac's connected through USB and running in event mode can give some feedback too.
I am pretty sure there is something wrong with MusicBee's current handling of the event buffer.

vincent kars

  • Sr. Member
  • ****
  • Posts: 445
It is a UAC1 compliant DAC
It uses isochronous mode (that’s UAC , be it 1 or 2) but with adaptive synchronization.
At that time (2007 I believe) standard, obsolete today.

USB drivers might be an issues
If you are running Win10, you might try the Win native mode drivers.
They are UAC2 compliant.
This assumes that your DAC is UAC2 compliant as well



hiccup

  • Sr. Member
  • ****
  • Posts: 7893
It is a UAC1 compliant DAC
It uses isochronous mode (that’s UAC , be it 1 or 2) but with adaptive synchronization.
At that time (2007 I believe) standard, obsolete today.

USB drivers might be an issues
If you are running Win10, you might try the Win native mode drivers.
They are UAC2 compliant.
This assumes that your DAC is UAC2 compliant as well

Thanks Vincent.
I never heard of isonchronous, UAC1 or 2, and I think I won't be investing much time in finding out what that is. (or was)  ;-)

I just read/quoted what a guy working for Benchmark said here:
https://www.head-fi.org/threads/benchmark-dac1-now-available-with-usb.223006/page-9#post-2759534

"The Benchmark DAC1 USB runs in synchronous mode"

My dac (which uses an Amanero Combo 384 USB receiver) needs the Amanero drivers.
Windows native drivers are not an option for me.


So with all due respect, the experiences you described concerning the event buffer settings with your (by now 10 yr. old) dac should probably not be taken into account concerning the issues reported here.
Last Edit: August 11, 2017, 09:36:10 PM by hiccup


hiccup

  • Sr. Member
  • ****
  • Posts: 7893
When I look at this http://www.rme-audio.de/en/products/adi_2-pro.php I'm tempted

Wow, very nice.
Don't hesitate. Treat yourself, buy it.

(and then report back on the event buffering ;-)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34363
@hiccup, to summarise you tried with event mode disabled (the default) and the first milliseconds of the very first track are cut off. The reason you are trying with event mode is because you managed to get it working with foobar by manipulating the WASAPI buffer but doing the same in MB doesnt help.
I know you think MB isnt using the buffer setting but i assure you it is. It might just be easiest if in the next MB version it played 100ms of silence before starting the very first track

hiccup

  • Sr. Member
  • ****
  • Posts: 7893
to summarise you tried with event mode disabled (the default) and the first milliseconds of the very first track are cut off. The reason you are trying with event mode is because you managed to get it working with foobar by manipulating the WASAPI buffer but doing the same in MB doesnt help.

Yes. Also, event mode is the recommended mode for this Amanero USB receiver, and event mode should allow for a lower hardware buffer than push mode.

Quote
I know you think MB isnt using the buffer setting but i assure you it is.

I am sure you're right, but I assumed the buffer 'malfunctioning', since when in foobar changing it from e.g. 50 to 90, the issue immediately disappears for me, and the songs play from the absolute beginning.



Quote
It might just be easiest if in the next MB version it played 100ms of silence before starting the very first track

I still don't understand why changing the value of the event buffer in MusicBee doesn't work the same (for my dac?) as setting the event buffer in foobar, but as long as you understand, that's all that matters.

vincent kars

  • Sr. Member
  • ****
  • Posts: 445
It is probably a driver issue.
The drivers I use simply play silence all of the time hence the DAC locks permanently.
There are drivers that mute instead of playing silence.
The moment playback starts, the DAC must get a lock and sometimes this requires too much  time hence the first part of the audio is missing or garbled.
Playing some silence first will help in these cases.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3838
  • MB Version: 3.6.8878 P
I was just re-reading the BASSWASAPI documentation and found something I missed before.
By default, BASSWASAPI is not set to exclusive mode.  The default mode is shared and has to be changed to exclusive mode by calling the BASS_WASAPI_EXCLUSIVE command.
If this is not set, then even in event mode, the buffer length is ignored and the system will choose an appropriate buffer length.
http://www.un4seen.com/doc/#basswasapi/BASS_WASAPI_Init.html
MusicBee and my library - Making bee-utiful music together

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34363