vsound 0.6 review
DownloadVsound is a Linux/Unix application which allows you to digitally record the output of another program such as RealPlayer
|
|
Vsound is a Linux/Unix application which allows you to digitally record the output of another program such as RealPlayer. The recorded output can be saved in a WAV file or can be sent into another program such as an MP3 encoder.
The vsound program uses a very interesting if unusual technique to carry out its work. Linux and other unix-like systems allow functions in a shared library to be overridden without having to replace the whole library. This is done by writing a new shared library which contains the definitions of the functions you wish to override. In addition, by the use of the dlsym() function, it is still possible to call the original function by use of a function pointer.
In the case of vsound, the functions which need to be overridden are; open(), ioctl(), write() and close(). By overridding these functions, it is possible to detect all attempts to open the /dev/dsp device. From there on, all ioctl() calls on this device are recorded to a file which can later be used to determine the data format of the file being played. In addition, the standard write() function is also overridden so that all audio data written to the audio device is also written to a temporary file. Similarly, the close() function is overridden so we know when to close the file containing the captured audio data.
The functions we wish to override are gathered together in shared library called libvsound.so. The other part of the vsound system is a shell script called vsound. This shell script uses the LD_PRELOAD variable to tell the system to preload libvsound.so and then run the target program with all its command line arguments. When the target program terminates, the vsound shell script uses SoX to convert the AU format file into a WAV file named vsound.wav in the current directory.
What's New in This Release:
vsound.c
Rolled in autostop patch by Richard Taylor Kills the player after a set number of seconds of inactivity (defined as the time that the /dev/dsp device is closed)
vsound.in
--autostop (-a) autostop option handling from above patch added Fixed non-functional --resample (-r) option
vsound 0.6 keywords