Hi

A few words to the KHdRecord program.

-----------------------------------------------------------------------------
Licence:

This program is under GPL.
If you modify it, please inform me. Then I can integrate your changes into
the main source tree.

-----------------------------------------------------------------------------
Function:

The program reads audio data from the souncdard (dev/dsp) and stores them
to disk. You can have continued recording like a tape recorder. The limitation 
is only your harddisk. As an option you can only encode the audio data into
mp3 or ogg-vorbis, which reduces the data size to a tenth. 
For MP3 encoding you should have at least a CPU with more than 300 MHz. 
For Ogg encoding even more CPU speed is needed.
A special mode is the analyze mode: the program analyzes the signal. 
If the input level is below a value, the recording is stopped. 
If there is a signal, then the recording starts automatically. 

-----------------------------------------------------------------------------
Running as non-root

You need access to the devices /dev/dsp and /dev/mixer. On many machines
these are links to /dev/dsp0 and /dev/mixer0. If you are working as non-root
you must have to the devices. Change the permission (as root) to 777:
chmod 777 /dev/mixer0
chmod 777 /dev/dsp0
Ok, this openes the devices for everyone. For more security you can also 
think about special groups, which only gets access to the devices. But this
depends on your situation.


-----------------------------------------------------------------------------

Artsd. 
Typical the artsd prevents this program from accessing the /dev/dsp device.
Kill the artsd process, if it blocks the program.

Armin Bhler sent me an method to use the artsd. On one of my computers it works,
on the other it fails. I haven't detected the reason. Try it on your own risk.
Select as input device "artsd", and the program should get the musik data over
artsd, without talking directly to /dev/dsp.

-----------------------------------------------------------------------------
Compile:

Enter
	make clean
	make
and you will receive the program KHdRecord.

Installation:
Just copy the program into a directory of your choice. For example
/usr/local/bin or in a directory, where you keep your executables.


-----------------------------------------------------------------------------
Command Line

The version 6 has a command line mode. The purpose is to start and control
KHdRecord from scripts. Here a short introduction.
The command line mode is reached by adding "-command" as parameter. Then
no graphical user interface (GUI)is created.
To give the additional parameters there are 2 possibilities:

1) Recorderfile
KHdRecord -command -recorderfile=xxx.list
Invokes KHdRecord and uses the recorder file xxx.list. You can easily
enter the recorder file with the GUI before.

2) Enter every Parameter
KHdRecord -command -start=2002-03-08/20:30:40 -stop=2002-03-08/20:40:50
Start a recording on 8.March 2002, at 20:30:40. It recordes until 20:40:50.

The single parameters are

-start=<time>
Give a start time in the format YYYY-MM-DD/hh:mm:ss.
-start=+<offset>
Takes the current time + <offset> seconds as start time.

-stop=<time>
Give a stop time in the format YYYY-MM-DD/hh:mm:ss.
-stop=+<offset>
Takes the current time + <offset> seconds as stop time.

-outputfile=<name>
Set <name> as prefix for the output file.

-input=<channel>
Selects the input channel. Valid is line,cd and mic.

-sounddevice=<device>
Changes the dsp device name to <device>.

-mixerdevice=<device>
Changes the mixer device name to <device>.

-level=<number>
Set the input level to the <number>. Number must be between 0 and 100.

-master=<number>
Set the Master input level to the <number>. Number must be between 0 and 100.

-bitrate=<rate>
Selects the encoding rate. Possible are 40, 128, 160, 192 and 256.

-recordmode=wav | mp3 | ogg
Selects the encoding mode. mp3 is the default.

-analyze
Switches into the analyze mode. Program will never terminate

-analyzelevel=<number>
Level for the analyze mode

-analyzetimeout=<number>
Timeout for the analyze mode


An Example
KHdRecord -command -start=+10 -stop=+15 -bitrate=256 \
            -outputfile=afile -sounddevice=/dev/dsp0
Starts in 10 seconds a recording for 5 seconds. 
The MP3 Bitrate is 256 KBits/sec.
As file prefix is afile used.
The noise is taken from the device /dev/dsp0.

-----------------------------------------------------------------------------
The Author

Peter Jodda
peter@jodda.de



