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


Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32034
for v3.2 i have put in a 100ms delay for the first file played with WASAPI output

hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887
for v3.2 i have put in a 100ms delay for the first file played with WASAPI output

Any chance that if v3.2 is going to take a while to get it's first release, you could retro-fit v3.1 with this?
Or are you hesitant because it might screw things up for other users?

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32034

hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32034
i forgot to mention, the patch earlier today included this change.
If it still doesnt work i have one last thing i can do

hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887
Alas, no difference. Still a cut-off at the beginning of playback.

edit,
I notice this is the same for both event and push mode.
Only directsound starts flawless.
Last Edit: October 08, 2017, 07:52:58 AM by hiccup

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32034

hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887
No difference at all.

A pity, and especially frustrating since with foobar I am still able to pinpoint it to exactly this:



If set to 60, I get the same audio truncation as with MusicBee, and by setting it to 80, it is solved.

Anyway, thanks a lot for the time and effort you've put into this.
I'll just hope that perhaps some future Windows 10 native USB audio drivers, or newer drivers for my Amanero usb receiver solves it for me.

rurutia10

  • Jr. Member
  • **
  • Posts: 122
I made a thread on this a year ago in the wishlist forum too. I was in the exact same boat as you, I bought a hifi DAC, but the first second of every song was being cut off. I made a thread in this forum asking for an option to include second(s) silence to the start of every thread. But it was just getting ignored. No one replied to it. Eventually, I just asked Phred to delete the thread, and I stopped using Musicbee and switched to Foobar.

The reason there's a silence is because the DAC needs a second to initialize. There are players out there like Jriver that just take account for DACs automatically, and there's no silence at the start of tracks. For Foobar, there's the DSP "Affix silence". I set it up to play a 500 milliseconds silence before starting every track, and it works well.

Glad it got attention though, maybe I can go back to Musicbee. Used it for years and enjoyed it.

Also, I wanted to add, 100ms is not enough. Try 500ms. It might depend on the DAC you're using though.

Also, please add support for ASIO and/or include an option for silence at the start of tracks :)
Last Edit: October 09, 2017, 12:17:06 PM by rurutia10

hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887
Steven has put a lot of effort in this over the last period.
You might want to try the latest update, and fiddle around with the buffer settings. (also in the .ini file)
Perhaps you are able to solve it for your dac now?
It did solve similar issues for other members too.

For me it's really some 10ms that seems to be able to make the difference. (trying it in foobar2000, that is)
Having it 500ms or longer doesn't make a difference for my setup at all.
With all settings (except directsound) something like the first 50ms is truncated.
(just the very first attack of percussion, guitar string etc.)

The fact that Steven has not been able to fix this for my setup is proof to me it is really a complicated matter, and also very hardware dependent.

For example, I also tried MediaMonkey.
Whilst it has almost identical settings to foobar in regards of setting options for push and event buffers, MediaMonkey also keeps truncating the beginning of the sound no matter what I set those to.

But maybe there is some truth in your suggestion of 'adding some silence' to the beginning.
Yet, I don't have to activate something like 'add silence' in foobar?
Maybe that's something that foobar does differently (automatically?) when setting the buffer? I have no clue really.

But it does seem that only foobar (and me) seem to like my dac a lot...
Last Edit: October 09, 2017, 12:51:01 PM by hiccup

rurutia10

  • Jr. Member
  • **
  • Posts: 122
Steven has put a lot of effort in this over the last period.
You might want to try the latest update, and fiddle around with the buffer settings. (also in the .ini file)
Perhaps you are able to solve it for your dac now?
It did solve similar issues for other members too.

For me it's really some 10ms that seems to be able to make the difference. (trying it in foobar2000, that is)
Having it 500ms or longer doesn't make a difference for my setup at all.
With all settings (except directsound) something like the first 50ms is truncated.
(just the very first attack of percussion, guitar string etc.)

The fact that Steven has not been able to fix this for my setup is proof to me it is really a complicated matter, and also very hardware dependent.

For example, I also tried MediaMonkey.
Whilst it has almost identical settings to foobar in regards of setting options for push and event buffers, MediaMonkey also keeps truncating the beginning of the sound no matter what I set those to.

Only foobar seems to like my dac a lot...

I still need to check it out.

Try out the DSP suggestion I was talking about with Foobar btw, while reverting that hardware buffer setting you used to default. If it works, you'll know that it's a software issue and not a hardware one. Players sometimes just struggle with certain dacs.

If you experience songs being cut off at the start while using a DAC, the solution is nearly always to enable a 500 ms silence at the start of every track. This way, what is being cut off is the silence it self, and not the actual music.

Also, for reference, JRiver has this option, describing what I stated above.

"Play silence at startup for hardware synchronization. Some hardware requires a lead time from when a signal is delivered to when sound is produced. This option allows outputting leading silence so no actual sound is lost in these cases. Note that this option is only in effect in two cases - at the first playback after the program starts, and between tracks with different sample rates. This silence will not be played between tracks with the same sample rate."
Last Edit: October 09, 2017, 01:08:32 PM by rurutia10

hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887
Try out the DSP suggestion I was talking about with Foobar btw, while reverting that hardware buffer setting you used to default. If it works, you'll know that it's a software issue and not a hardware one.

I just tried it, and it does indeed also solve the issue in my case.
(for me, adding 70ms already seems to be enough)

So that could perhaps be a path to a solution for MB.
Thanks for instilling some hope ;-)


PS
I would advice against removing older topics.
Even whilst what was raised then got little or no attention, or a solution, it will probably be found and read anyway, and might be useful to others to learn about.


hiccup

  • Editor
  • Hero Member
  • *****
  • Posts: 4887
You're welcome. Also, check the edit :)

I have.
It's still funny that for foobar only adjusting the event buffer is already enough.
But I remember suggesting earlier if perhaps foobar first starts playing silence during the time that was set for buffering, but that MB starts playing immediately anyway, whilst filling the buffer.
In my layman's mind that could explain it.

edit:
Just curious, if you disable the plugin, and set the event buffer to 500ms in foobar (advanced settings), does that solve it for you too?