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

constant buffering even with silence #12

Open
natedreger opened this issue Mar 10, 2020 · 4 comments
Open

constant buffering even with silence #12

natedreger opened this issue Mar 10, 2020 · 4 comments

Comments

@natedreger
Copy link

This program is exactly what I need to get my whole house audio setup going. One catch I'm having is that even with silence the buffer keeps writing to my fifo file. Have tried setting the silence threshold to max and no different. This may not be an issue for others but I'm using forked-daapd to automatically play when a fifo starts and using cpiped and Shairport to feed it.

I've tried different sound cards and different paths in arecord, no help.

Hope someone can help!

@natedreger
Copy link
Author

Nevermind, fixed it myself. Rearranged some things and added if (soundcount > 0).

@maweki
Copy link

maweki commented Mar 11, 2020

Can you share the diff of the fix please

@natedreger
Copy link
Author

Can you share the diff of the fix please

Yes, new to github and haven’t coded in 20 years but will share code once I figure that out. If you want to try it yourself I basically separated the tasks of reading and writing and put the writing tasks inside of an if>then statement controlled by the soundcount variable.

@monte-monte
Copy link

Dirty fix would be changing line 368 to:

if (!fillbuf && !silent) {

Also would be nice to mute printf, for this period of silence. I'm not sure if there is need to do anything else in terms of rearranging the code.

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

3 participants