I'm trying to record exactly the digital signal that my computer is playing. For example, if I was to play a WAV file using an audio player, I would like to be able to reconstitute such file from the recording.
As I understand it, it's not doable with compressed format (such as mp3) because the file is uncompressed by the application reading it and what is actually sent to the sound card (I guess?) is uncompressed raw data. And it would be impossible to get back the original mp3 from that. The best I could have would be the mp3 embedded in WAV or whatever lossless compression such as FLAC.
So far, I'm using Audacity to record sound coming from the computer. However, I'm wondering: does such recording records raw digital data going to the sound card, or does it capture analog data going out of the sound card and converts it back to digital?
Also, this requires to tweak the level of recording in Db in the Pulse Audio Volume Control. Depending on the level of course the final WAV won't be the same, so I don't know how to get a final WAV that would match the one that is originally played.
Well, actually this approach doesn't even work properly for me as the recording in Audacity doesn't have the same pitch. But as I'm not sure this is the correct path in a first place, I would like to know more before trying to debug that.
I don't know whether what I'm trying to do is possible in a first place.