Currently I am trying to use cdparanoia to play from an audio cd directly without making any temporary files. I can play the first track of a cd realtime by doing
cdparanoia -e 1 /dev/shm/tmp.wav 2>/dev/null & play /dev/shm/tmp.wav
however I don't want to use this method because it makes temporary files, sometimes my /dev/shm is full and because I want a more elegant solution which can be written in one line.
I tried two solutions on Linux using bash.
cdparanoia -e 1 - 2>/dev/null | play -
did nothing. The second:
cdparanoia -pe 1 - 2>/dev/null 1>/dev/sound
This just made random scratching sounds showing that the data is not formatted correctly. I suspect it may be 16bit instead of 8bit.
If anyone has a solution let me know. I am looking for a POSIX Bash solution in one line with no temporary files.