The following routines implement a fast buffered file I/O system, which supports the reading and w), title="Starts recording in the specified format.">start_sound_input, get_sound_input_cap_parm, get_sound_input_cap_rate, get_sound_input_cap_stereo.
Return value: Returns non-zero if the driver is capable of stereo recording.
See also: start_sound_input, get_sound_input_cap_parm, get_sound_input_cap_bits, get_sound_input_cap_rate.
int max_freq;
...
/* What frequency can we record 8 bits mono at? */
max_freq = get_sound_input_cap_rate(8, 0);
if (max_freq > 22000) {
/* Ok, 22KHz and above is good enough. */
}
See also: start_sound_input, get_sound_input_cap_parm, get_sound_input_cap_bits, get_sound_input_cap_stereo.
Return value: The function returns one of the following possible values:
0 = It is impossible to record in this format.
1 = Recording is possible, but audio output
will be suspended.
2 = Recording is possible at the same time as
playing other sounds (full duplex soundcard).
-n = Sampling rate not supported, but rate 'n'
would work instead.
See also: start_sound_input, get_sound_input_cap_bits, get_sound_input_cap_rate, get_sound_input_cap_stereo.
SOUND_INPUT_MIC
SOUND_INPUT_LINE
SOUND_INPUT_CD
Return value: The function returns zero on success, or -1 if the hardware does not provide an input select register (ie. you have no control over the input source).
See also: start_sound_input.
Return value: Returns the buffer size in bytes if successful, or zero on error.
See also: install_sound_input, read_sound_input, stop_sound_input, digi_recorder, set_sound_input_source, get_sound_input_cap_parm, get_sound_input_cap_bits, get_sound_input_cap_rate, get_sound_input_cap_stereo.
See also: start_sound_input.
Note: many cards produce a click or popping sound when switching between record and playback modes, so it is often a good idea to discard the first buffer after you start a recording. The waveform is always stored in unsigned format, with stereo data consisting of alternate left/right samples.
Return value: The function will return non-zero if a buffer has been copied or zero if no new data is yet available (you were too fast checking the input).
See also: start_sound_input.
See also: install_sound_input, start_sound_input.
See also: install_sound_input, midi_out.