Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio delay varies #71

Closed
ablazhov opened this issue Feb 29, 2020 · 12 comments
Closed

Audio delay varies #71

ablazhov opened this issue Feb 29, 2020 · 12 comments

Comments

@ablazhov
Copy link

On every first start after Windows boots up there is a delay of about 9 seconds. If I leave the audio streaming for a little bit, then restarting DAS brings the delay to about 1.5-2 seconds, which is perfect. Well, it may take 2 or 3 restarts to get this short delay. What causes this initial long delay? Can't it be somehow avoided at all?
My PC is on WiFi connection, no network traffic. Windows 7 x64.

Great piece of software! Thank you so much for all your efforts!
Is there a way I can donate to the project?

@SamDel
Copy link
Owner

SamDel commented Mar 1, 2020

There always a delay, because of the buffers on the Chromecast & application.
I'm not sure why the audio delay varies for you. Is the option 'Stream Format' on 'Mp3 - 320kbps' (default) for you? What type of Chromecast are you using?

You can contribute to the project by (keep) posting issues, or writing code & pull requests!

@ablazhov
Copy link
Author

ablazhov commented Mar 1, 2020

Stream format is 'Wav (44100 Hz)'
Chromecast Audio (gen. 2 I believe)
Lag Control is 700.

Just FYI, when I use Foobar2000 + UPnP MediaRenderer Output plugin + BubbleUPnPServer (no transcoding) for streaming FLAC and mp3 music I have a constant delay of about 1 sec.

@SamDel
Copy link
Owner

SamDel commented Mar 2, 2020

Thanks!
To pinpoint: Maybe the soundcard has to 'wake up' after Windows boots up. DAS waits until there's 310k of audio data captured before it starts streaming.

  • Do you have 'Start application when Windows starts' checked?
  • What happens when you wait for a couple of minutes after Windows boots up before launching DAS?

@ablazhov
Copy link
Author

ablazhov commented Mar 3, 2020

I believe the problem isn't related to the audio subsystem. I can here sounds and music on my headphones immediately after Windows boots up.
I discovered that I don't have to restart DAS to get the shorter delay - all it takes is restart the connection to my Cromecast Audio using the Start/Stop button from DAS' control panel. It takes several (5-6-7) restarts though before it eventually gets there.
No, auto-start is disabled.
Waiting doesn't help. Looks like the only thing that helps is reconnecting several times to Chromecast Audio. Initially I thought I have to stream some music first before I can get the shorter delay, but now I'm pretty sure this is not the case.
Do you know of other DAS users with Chromecast Audio?

@SamDel
Copy link
Owner

SamDel commented Mar 3, 2020

Then it's indeed most likely related to the connection with the Chromecast.
You can also try to put the lag control on 1 (left side) for about 10 seconds, and then back to 700. (Not a proper solution off course)

I'm going to do a test with my Chromecast audio...

@SamDel
Copy link
Owner

SamDel commented Mar 7, 2020

I have the same behaviour with my Chromecast audio (tested once).
So I can investigate and will come back to you later...

@ablazhov
Copy link
Author

ablazhov commented Mar 7, 2020

I tested my Chromecast Audio with another computer on the same network and its behaviour is the same.
Hope you will figure it out!

@SamDel
Copy link
Owner

SamDel commented Mar 18, 2020

In Setup 2.7.1.zip I increased the initial buffer from 310k to 350k. This audio buffer is send to the device when it starts playing. Can you try if it also works for you?

Sorry for the late response, I was busy with other things.

@ablazhov
Copy link
Author

Looks like you've nailed it!
Now every time I start DAS or reconnect it to my Chromecast Audio the delay is the same - about 2 seconds. Great Job!

@SamDel
Copy link
Owner

SamDel commented Mar 18, 2020

Nice, thanks!

@ablazhov
Copy link
Author

Should I close the issue?

@SamDel
Copy link
Owner

SamDel commented Mar 19, 2020

Sure, I will close it. Let me know if there are further issues!
I'll add the fix to the 2.8 release later!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants