Scenario:
OS: raspbian buster
- I have an audio chain as follows USB Audio Input->arecord->named pipe->forked-daapd. In the present configuration, arecord and forked-daapd are both set up as standard systemd services.
- The goal is to send audio from a turntable to a network audio endpoint (Sonos).
- The arecord part of the pipe is a very simple "arecord -D plughw:1,0 -t wav -f cd /srv/music/phono-source"
- If I create the named pipe ("phono-source") with mkfifo and then launch the arecord and forked-daap services, everything appears to work as expected.
- If I leave the configuration running but "idle", ie turntable not in use, so assume effectively generating silence/noise, at some point later, the original named pipe object gets renamed to "phono-source-01" and a new conventional (not pipe) file "phono-source-02" gets created. arecord is now writing data to the new file, which grows in size at the expected rate.
- This had me baffled for a little while until I realized that the audio out would have reached the maximum size for a wav file. Leaving things running for a little while longer, this was sort of confirmed as when phono-source-02 reached 2147483692 bytes, output resumed to a new conventional file, phono-source-03.
- I was vaguely aware of a 2Gig limit on wav files, but I had assumed that was a physical file limit, and since I am writing to a pipe in this case that it would not apply - apparently not. The brute force approach here would be to terminate the arecord service after each album was played on the turntable and start it for the beginning of a new album.
Any suggestions on a strategy for avoiding this problem, either by doing something different with the pipe, or using an alternate audio grabber like sox?
Any thoughts?