Author Topic: additional buffer setting for wasapi (asio?) to solve some problems  (Read 13918 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7784
I recently purchased a new dac, and with MusicBee there is now the problem that a fraction of the beginning of a song is cut-off.
It's only a tiny bit, but just enough to mute the attack of the first piano/drum/guitar note.

I have tried all possible settings, and I found that it is possible to solve this issue by increasing the buffer, but that will only work when directsound is selected.
But for asio or wasapi the buffer seems to have no effect on this problem at all.

I then tried foobar2000.
The main 'Buffer length' setting there also didn't solve it.
But then under 'advanced' I found a secondary buffer setting, named something like 'hardware buffer setting for wasapi event mode' (you can also set a separate buffer for 'push' mode)
Increasing that from 25ms to 100ms immediately solved my issue.

So it looks like the existing buffer setting in MusicBee is not enough to solve some issues with asio/wasapi.
That seems to need some 'hardware' buffer setting.

So, that's my request.


edit,

I just noticed that the settings.ini has an entry for this, but changing the value there from 0 to 100 (or 1000) doesn't do anything.
So that might be a bug?
Last Edit: August 04, 2017, 09:25:35 PM by hiccup

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
...there is now the problem that a fraction of the beginning of a song is cut-off.
It's only a tiny bit, but just enough to mute the attack of the first piano/drum/guitar note.
I've also noticed this in wasapi/asio, only ever occuring on the first track of a list.
I found that rapidily double-clicking the play buton (effectively pausing the track right at the begininng) and then pressing the play button eliminates this.
I'm assuming that before starting to play, MB doesn't wait the fraction of a second for the buffers to fill and so you lose that little bit of playback.
MusicBee and my library - Making bee-utiful music together

hiccup

  • Sr. Member
  • ****
  • Posts: 7784
I've also noticed this in wasapi/asio, only ever occuring on the first track of a list.

Yes, that is the same behavior that foobar2000 has when the buffer is set too low.
The first track is cut-off, the next in a playlist will play fine.

I found an earlier post where it was stated that if in .ini the setting is '0' (=default), the buffer will actually be 83ms.
But I doubt if that's the case, since when I set the buffer to 83ms in foobar, the cutting-off is solved.
So it seems that the wasapi hardware buffer is plain defunct.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
if you have event mode enabled, in MusicBee3Settings.ini you can set
<PlayerWasapiEventModeBuffer> to the number of milliseconds

hiccup

  • Sr. Member
  • ****
  • Posts: 7784
if you have event mode enabled, in MusicBee3Settings.ini you can set
<PlayerWasapiEventModeBuffer> to the number of milliseconds

Yes, but as I was trying to explain, that seems defunct.
Changing the value there doesn't seem to make any difference at all.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
I've also noticed this in wasapi/asio, only ever occuring on the first track of a list.

Yes, that is the same behavior that foobar2000 has when the buffer is set too low.
switched back to asio and increased the buffer size to 512 samples - no problems now

@ Steven
I was reading the BASS_WASAPI documentation and found this:
Quote
buffer    The length of the device's buffer in seconds. This is a minimum and the driver may choose to use a larger buffer; BASS_WASAPI_GetInfo can be used to confirm what the buffer size is. For an output device, the buffer size determines the latency.
but you say
if you have event mode enabled, in MusicBee3Settings.ini you can set
<PlayerWasapiEventModeBuffer> to the number of milliseconds
Does the .ini making the adjustment back to seconds?
MusicBee and my library - Making bee-utiful music together

hiccup

  • Sr. Member
  • ****
  • Posts: 7784
Does the .ini making the adjustment back to seconds?

Funny that you observed that too.
I also wondered why the ini entry for event buffer didn't say 'Ms', as the 'regular' buffer entry does.
So besides entering something like '100', I also tried '0.1' and 0,1'.

But as soon as MB starts, these values get reset to plain '0' again.


hiccup

  • Sr. Member
  • ****
  • Posts: 7784


hiccup

  • Sr. Member
  • ****
  • Posts: 7784
you should enter 100

Ok, so that's what I have been doing from the start.

But this doesn't have any noticeable effect, and it it doesn't solve the problem of the first tiny part of audio missing.
As stated before, in foobar2000 setting it to 100ms has an immediate effect and will solve the issue.
So there seems to be a bug with MusicBee/BASS handling the event buffer.

hiccup

  • Sr. Member
  • ****
  • Posts: 7784
Would you prefer to let this rest until after 3.1 is final?
Or maybe you'd prefer an 'official' bug report?

Steven

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