Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 347 → Rev 348

/programy/C/SID/sidd
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programy/C/SID/sidd.c
28,7 → 28,7
// Tuneable Settings //
///////////////////////////////////////////////////////////////////////////////
 
#define VERSION "0.93"
#define VERSION "0.94"
 
//
// Number of soundcard bytes to read at a time.
79,9 → 79,20
 
// Mixer gain settings requested by config file.
int req_lgain = -1; // Line gain
int req_mgain = -1; // Microphone gain
int req_igain = -1; // Input gain
int req_rgain = -1; // Record level
 
 
// Actual mixer values, read by open_mixer()
int mixer_recmask; // Recording device mask
int mixer_stereo; // Stereo device mask
int mixer_line; // Line input gain setting
int mixer_microphone; // Microphone input gain
int mixer_igain; // Overall input gain setting
int mixer_reclev; // Recording level setting
int mixer_recsrc; // Mask indicating which inputs are set to record
 
//
// Various filenames, contents set by config file.
//
662,8 → 673,18
int right = atoi( fields[3]);
int gain = (right << 8) | left;
 
if( !strcasecmp( fields[1], "line")) req_lgain = gain;
if( !strcasecmp( fields[1], "line"))
{
req_lgain = gain;
mixer_recsrc = SOUND_MASK_LINE;
}
else
if( !strcasecmp( fields[1], "mic"))
{
req_mgain = gain;
mixer_recsrc = SOUND_MASK_MIC;
}
else
if( !strcasecmp( fields[1], "overall")) req_igain = gain;
else
if( !strcasecmp( fields[1], "record")) req_rgain = gain;
695,14 → 716,6
// Mixer Stuff //
///////////////////////////////////////////////////////////////////////////////
 
// Actual mixer values, read by open_mixer()
int mixer_recmask; // Recording device mask
int mixer_stereo; // Stereo device mask
int mixer_line; // Line input gain setting
int mixer_igain; // Overall input gain setting
int mixer_reclev; // Recording level setting
int mixer_recsrc; // Mask indicating which inputs are set to record
 
void open_mixer( void)
{
if( (fdm = open( mixer, O_RDWR)) < 0)
782,6 → 795,19
mixer_line & 0xff, (mixer_line >> 8) & 0xff);
}
 
if( req_mgain >= 0)
{
report( 1, "requesting microphone input gains left=%d right=%d",
req_mgain & 0xff, (req_mgain >> 8) & 0xff);
 
if( ioctl( fdm, SOUND_MIXER_WRITE_MIC, &req_mgain) < 0 ||
ioctl( fdm, SOUND_MIXER_READ_MIC, &mixer_microphone) < 0)
bailout( "error setting mixer microphone gain");
 
report( 1, "Microphone input gains set to: left=%d right=%d",
mixer_microphone & 0xff, (mixer_microphone >> 8) & 0xff);
}
 
if( req_igain >= 0 &&
(mixer_recmask & SOUND_MASK_IGAIN))
{
810,9 → 836,24
mixer_reclev & 0xff, (mixer_reclev >> 8) & 0xff);
}
 
mixer_recsrc = SOUND_MASK_LINE;
if( ioctl( fdm, SOUND_MIXER_WRITE_RECSRC, &mixer_recsrc) < 0)
bailout( "cannot set mixer recsrc to line");
//mixer_recsrc= SOUND_MASK_LINE;
mixer_recsrc= SOUND_MASK_MIC;
 
switch (mixer_recsrc)
{
case SOUND_MASK_MIC:
if( ioctl( fdm, SOUND_MIXER_WRITE_RECSRC, &mixer_recsrc) < 0)
bailout( "cannot set mixer recsrc to microphone");
else report(1, "Input device set to microphone");
break;
 
case SOUND_MASK_LINE:
if( ioctl( fdm, SOUND_MIXER_WRITE_RECSRC, &mixer_recsrc) < 0)
bailout( "cannot set mixer recsrc to line");
else report(1, "Input device set to line");
break;
}
}
 
///////////////////////////////////////////////////////////////////////////////
/programy/C/SID/sidd.conf
26,13 → 26,15
; Line input gains, left and right. If using mono, set them both the same.
; Range is 0 to 100. The logfile will report the actual values set, which
; may differ a little.
gain line 77 100
;gain line 77 100
 
gain mic 100 100
 
; Overall input gains, comments as above.
gain overall 86 100
;gain overall 86 100
 
; Overall record level, comments as above.
;; gain record 100 100
;gain record 100 100
 
; Specify a directory to contain daily data files. Use '.' for the
; current directory. Output files will be datadir/yymmdd.dat when running
66,10 → 68,10
; sidd.
;
; ident from to
band 18k3HWU 18200 18400 ; Le Blanc, France, 46:37N 001:05E 162.8 deg 508.6 miles
band 19k6GBZ 19480 19680 ; Anthorn, UK 54:54n 003:18W 329.6 deg 96.4 miles
band 22k1GBZ 22050 22150 ; Skelton, UK, 54:42:24N 2:53:06W 335.0 deg 76.7 miles
band 20k3ICV 20190 20340 ; Tavolara, Italy, 40:55N 009:45E 143.4 deg 1038.8 miles
band 18k3HWU 18200 18400 ; Le Blanc, France
band 19k6GBZ 19480 19680 ; Anthorn, UK
band 22k1GBZ 22050 22150 ; Skelton, UK
band 20k3ICV 20190 20340 ; Tavolara, Italy
band B1 20800 21000 ; Background channel
band B2 22650 22850 ; Background channel