Hi,
Does anyone understand how Linux audio works, well enough to give me some pointers on this?
I subscribe to an audio streaming service. I listen to this by accessing the material on Firefox, and this sends it over SPDIF out to an outboard combined DAC and headphone amp. So far everything is fine and it sounds great. However, this is at my desk....where we are not always sitting when wanting to listen to tunes.
Sometimes I want to listen to the material on my tiny little portable player when out and about. So I record the stream to file and copy it across. I've discovered two fairly straightforward ways of doing this. They are a bit manual, but I do not do it often so its OK.
One is a neat little command line tool called gramofile. You start it up in record mode, then tune in the stream, and it writes it to a WAV file of your choice. Why WAV, when its coming in as MP3? Dunno.
The second is, you start pavucontrol, then Audacity, and after getting the source right, you just do record, and start up the stream. This records it, and you then save it as whatever you want.
There is also a package called streamripper, which seems like it would do this, but I have not yet bothered. It lets you send a user string corresponding to Firefox and to input user name and password. And maybe mplayer will do it, and there is probably a way to input user name and password on VLC from a command line startup. But the above two methods work so I have not hacked around with alternatives any further.
My puzzle is not about HOW to do it, its about WHAT this is doing.
I would like to be able to save the stream in the mode in which its received. If it is, for instance 320k mp3, then I would like to save it as that, with no recoding which presumably will lower quality. But something else must be going on with gramofile, because its WAV that is written to disk. Similarly with Audacity. At what point are they getting the stream and what are they doing with it?
When doing the above recording, what exactly is being recorded? Is it a digital stream that is being written to file? Is there any format conversion going on in gramofile or audacity? Are they maybe taking the analogue signal, and if so from where, and encoding it?
And if so, how do you get to write the digital stream being received, with no conversions, just as it comes in, to file?
PB