Audio-Injector / stereo-and-zero

Zero and original stereo sound cards
71 stars 14 forks source link

High resolution piping issues #35

Open vasilisvg opened 5 years ago

vasilisvg commented 5 years ago

Yesterday I received my Stereo sound card.. I want to use it to pipe the input from a phono pre-amp to forked daapd. This works fine when I use

arecord -f S16_LE -r 44100 -c 2 -t wav > /home/pi/music/pipe

Forked daapd automatically picks up the pipe and plays it. This turned out to be much easier that I thought (-:

But when I try to get a higher resolution problems occur. For instance when I try to use S24_LE, I get continuous "overrun!!! (at least 124.002 ms long)" warnings. And it sounds like the world is exploding. I tried adding some buffer on the arecord side of the pipe (-B 4000, or -B -4000, not sure how this works exactly) but that doesn't seem to do much.

Now I am wondering where to look for a solution. Is it a write speed issue? Do I need a microSD card with faster write speed than the SanDisk Ultra 16GB I am using right now? I guess write speed doesn't count with a pipe. Or is it a processor thing? I run the Stereo card on a Raspberry Pi 3 Model B Plus Rev 1.3 with an up to date Raspbian Buster Lite. Would a Raspberry Pi 4 solve these issues? Should I try overclocking?

Or do I need to look in a completely different direction? In the end I would love to use a resolution of -f S24_LE -r 96000, but right now this seems way out of reach. Any tips and help are very much appreciated!

flatmax commented 5 years ago

What happens when you use S32_LE as the resolution ?

It is possible there is less CPU operations with S32_LE.

On 19/10/19 6:48 pm, Vasilis van Gemert wrote:

Yesterday I received my Stereo sound card.. I want to use it to pipe the input from a phono pre-amp to forked daapd https://github.com/ejurgensen/forked-daapd/. This works fine when I use

|arecord -f S16_LE -r 44100 -c 2 -t wav > /home/pi/music/pipe |

Forked daapd automatically picks up the pipe and plays it. This turned out to be much easier that I thought (-:

But when I try to get a higher resolution problems occur. For instance when I try to use S24_LE, I get continuous |"overrun!!! (at least 124.002 ms long)"| warnings. And it sounds like the world is exploding. I tried adding some buffer on the arecord side of the pipe (|-B 4000|, or |-B -4000|, not sure how this works exactly) but that doesn't seem to do much.

Now I am wondering where to look for a solution. Is it a write speed issue? Do I need a microSD card with faster write speed than the SanDisk Ultra 16GB I am using right now? I guess write speed doesn't count with a pipe. Or is it a processor thing? I run the Stereo card on a Raspberry Pi 3 Model B Plus Rev 1.3 with an up to date Raspbian Buster Lite. Would a Raspberry Pi 4 solve these issues? Should I try overclocking?

Or do I need to look in a completely different direction? In the end I would love to use a resolution of -f S24_LE -r 96000, but right now this seems way out of reach. Any tips and help are very much appreciated!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Audio-Injector/stereo-and-zero/issues/35?email_source=notifications&email_token=AAFLUB2XKNWSOQH4CBSCAZ3QPK3T3A5CNFSM4JCOVN42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HS5ABPA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFLUB77M6EFH6XZWNPGKJ3QPK3T3ANCNFSM4JCOVN4Q.

vasilisvg commented 5 years ago

It seems to be an issue with forked-daapd after all. Things are being fixed over there now