1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-10-01 17:26:40 -04:00

DSD demod: replace printf by fprintf to stderr in DSD code

This commit is contained in:
f4exb 2016-04-09 04:34:12 +02:00
parent fd26ec52d5
commit 94336e0b63
22 changed files with 273 additions and 273 deletions

View File

@ -82,7 +82,7 @@ processDMRdata (dsd_opts * opts, dsd_state * state)
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
fprintf(stderr, "%s ", cachbits);
#endif
// current slot
@ -130,51 +130,51 @@ processDMRdata (dsd_opts * opts, dsd_state * state)
if (strcmp (bursttype, "0000") == 0)
{
sprintf (state->fsubtype, " PI Header ");
sprintf(state->fsubtype, " PI Header ");
}
else if (strcmp (bursttype, "0001") == 0)
{
sprintf (state->fsubtype, " VOICE Header ");
sprintf(state->fsubtype, " VOICE Header ");
}
else if (strcmp (bursttype, "0010") == 0)
{
sprintf (state->fsubtype, " TLC ");
sprintf(state->fsubtype, " TLC ");
}
else if (strcmp (bursttype, "0011") == 0)
{
sprintf (state->fsubtype, " CSBK ");
sprintf(state->fsubtype, " CSBK ");
}
else if (strcmp (bursttype, "0100") == 0)
{
sprintf (state->fsubtype, " MBC Header ");
sprintf(state->fsubtype, " MBC Header ");
}
else if (strcmp (bursttype, "0101") == 0)
{
sprintf (state->fsubtype, " MBC ");
sprintf(state->fsubtype, " MBC ");
}
else if (strcmp (bursttype, "0110") == 0)
{
sprintf (state->fsubtype, " DATA Header ");
sprintf(state->fsubtype, " DATA Header ");
}
else if (strcmp (bursttype, "0111") == 0)
{
sprintf (state->fsubtype, " RATE 1/2 DATA");
sprintf(state->fsubtype, " RATE 1/2 DATA");
}
else if (strcmp (bursttype, "1000") == 0)
{
sprintf (state->fsubtype, " RATE 3/4 DATA");
sprintf(state->fsubtype, " RATE 3/4 DATA");
}
else if (strcmp (bursttype, "1001") == 0)
{
sprintf (state->fsubtype, " Slot idle ");
sprintf(state->fsubtype, " Slot idle ");
}
else if (strcmp (bursttype, "1010") == 0)
{
sprintf (state->fsubtype, " Rate 1 DATA ");
sprintf(state->fsubtype, " Rate 1 DATA ");
}
else
{
sprintf (state->fsubtype, " ");
sprintf(state->fsubtype, " ");
}
// signaling data or sync
@ -203,24 +203,24 @@ processDMRdata (dsd_opts * opts, dsd_state * state)
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
fprintf(stderr, "%s ", syncbits);
#endif
if ((strcmp (sync, DMR_BS_DATA_SYNC) == 0) || (strcmp (sync, DMR_MS_DATA_SYNC) == 0))
{
if (state->currentslot == 0)
{
sprintf (state->slot0light, "[slot0]");
sprintf(state->slot0light, "[slot0]");
}
else
{
sprintf (state->slot1light, "[slot1]");
sprintf(state->slot1light, "[slot1]");
}
}
if (opts->errorbars == 1)
{
printf ("%s %s ", state->slot0light, state->slot1light);
fprintf(stderr, "%s %s ", state->slot0light, state->slot1light);
}
// current slot second half, cach, next slot 1st half
@ -230,11 +230,11 @@ processDMRdata (dsd_opts * opts, dsd_state * state)
{
if (strcmp (state->fsubtype, " ") == 0)
{
printf (" Unknown burst type: %s\n", bursttype);
fprintf(stderr, " Unknown burst type: %s\n", bursttype);
}
else
{
printf ("%s\n", state->fsubtype);
fprintf(stderr, "%s\n", state->fsubtype);
}
}
}

View File

@ -114,7 +114,7 @@ processDMRvoice (dsd_opts * opts, dsd_state * state)
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
fprintf(stderr, "%s ", cachbits);
#endif
// current slot frame 1
@ -226,7 +226,7 @@ processDMRvoice (dsd_opts * opts, dsd_state * state)
if ((j == 0) && (opts->errorbars == 1))
{
printf ("%s %s VOICE e:", state->slot0light, state->slot1light);
fprintf(stderr, "%s %s VOICE e:", state->slot0light, state->slot1light);
}
#ifdef DMR_DUMP
@ -240,7 +240,7 @@ processDMRvoice (dsd_opts * opts, dsd_state * state)
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
fprintf(stderr, "%s ", syncbits);
#endif
// current slot frame 2 second half
@ -307,7 +307,7 @@ processDMRvoice (dsd_opts * opts, dsd_state * state)
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
fprintf(stderr, "%s ", cachbits);
#endif
@ -358,7 +358,7 @@ processDMRvoice (dsd_opts * opts, dsd_state * state)
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
fprintf(stderr, "%s ", syncbits);
#endif
if (j == 5)
@ -376,7 +376,7 @@ processDMRvoice (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
}

View File

@ -161,8 +161,8 @@ writeSynthesizedVoice (dsd_opts * opts, dsd_state * state)
short *aout_buf_p;
// for(n=0; n<160; n++)
// printf("%d ", ((short*)(state->audio_out_temp_buf))[n]);
// printf("\n");
// fprintf(stderr, "%d ", ((short*)(state->audio_out_temp_buf))[n]);
// fprintf(stderr, "\n");
aout_buf_p = aout_buf;
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
@ -251,12 +251,12 @@ openAudioOutDevice (dsd_opts * opts, int speed)
// get info of device/file
struct stat stat_buf;
if(stat(opts->audio_out_dev, &stat_buf) != 0) {
printf("Error, couldn't open %s\n", opts->audio_out_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->audio_out_dev);
exit(1);
}
if( !(S_ISCHR(stat_buf.st_mode) || S_ISBLK(stat_buf.st_mode))) { // this is not a device
printf("Error, %s is not a device. use -w filename for wav output.\n", opts->audio_out_dev);
fprintf(stderr, "Error, %s is not a device. use -w filename for wav output.\n", opts->audio_out_dev);
exit(1);
}
#ifdef SOLARIS
@ -265,7 +265,7 @@ openAudioOutDevice (dsd_opts * opts, int speed)
opts->audio_out_fd = open (opts->audio_out_dev, O_WRONLY);
if (opts->audio_out_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_out_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->audio_out_dev);
exit (1);
}
@ -283,7 +283,7 @@ openAudioOutDevice (dsd_opts * opts, int speed)
if (ioctl (opts->audio_out_fd, AUDIO_SETINFO, &aset) == -1)
{
printf ("Error setting sample device parameters\n");
fprintf(stderr, "Error setting sample device parameters\n");
exit (1);
}
#endif
@ -295,7 +295,7 @@ openAudioOutDevice (dsd_opts * opts, int speed)
opts->audio_out_fd = open (opts->audio_out_dev, O_WRONLY);
if (opts->audio_out_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_out_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->audio_out_dev);
opts->audio_out = 0;
exit(1);
}
@ -303,26 +303,26 @@ openAudioOutDevice (dsd_opts * opts, int speed)
fmt = 0;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_RESET) < 0)
{
printf ("ioctl reset error \n");
fprintf(stderr, "ioctl reset error \n");
}
fmt = speed;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_SPEED, &fmt) < 0)
{
printf ("ioctl speed error \n");
fprintf(stderr, "ioctl speed error \n");
}
fmt = 0;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_STEREO, &fmt) < 0)
{
printf ("ioctl stereo error \n");
fprintf(stderr, "ioctl stereo error \n");
}
fmt = AFMT_S16_LE;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_SETFMT, &fmt) < 0)
{
printf ("ioctl setfmt error \n");
fprintf(stderr, "ioctl setfmt error \n");
}
#endif
printf ("Audio Out Device: %s\n", opts->audio_out_dev);
fprintf(stderr, "Audio Out Device: %s\n", opts->audio_out_dev);
}
void
@ -332,7 +332,7 @@ openAudioInDevice (dsd_opts * opts)
// get info of device/file
struct stat stat_buf;
if (stat(opts->audio_in_dev, &stat_buf) != 0) {
printf("Error, couldn't open %s\n", opts->audio_in_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->audio_in_dev);
exit(1);
}
if(S_ISREG(stat_buf.st_mode)) { // is this a regular file? then process with libsndfile.
@ -341,7 +341,7 @@ openAudioInDevice (dsd_opts * opts)
opts->audio_in_file_info->channels = 1;
opts->audio_in_file = sf_open(opts->audio_in_dev, SFM_READ, opts->audio_in_file_info);
if(opts->audio_in_file == NULL) {
printf ("Error, couldn't open file %s\n", opts->audio_in_dev);
fprintf(stderr, "Error, couldn't open file %s\n", opts->audio_in_dev);
exit(1);
}
}
@ -363,7 +363,7 @@ openAudioInDevice (dsd_opts * opts)
}
if (opts->audio_in_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_in_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->audio_in_dev);
exit(1);
}
@ -383,7 +383,7 @@ openAudioInDevice (dsd_opts * opts)
if (ioctl (opts->audio_in_fd, AUDIO_SETINFO, &aset) == -1)
{
printf ("Error setting sample device parameters\n");
fprintf(stderr, "Error setting sample device parameters\n");
exit (1);
}
#endif
@ -402,39 +402,39 @@ openAudioInDevice (dsd_opts * opts)
if (opts->audio_in_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_in_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->audio_in_dev);
opts->audio_out = 0;
}
fmt = 0;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_RESET) < 0)
{
printf ("ioctl reset error \n");
fprintf(stderr, "ioctl reset error \n");
}
fmt = 48000;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_SPEED, &fmt) < 0)
{
printf ("ioctl speed error \n");
fprintf(stderr, "ioctl speed error \n");
}
fmt = 0;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_STEREO, &fmt) < 0)
{
printf ("ioctl stereo error \n");
fprintf(stderr, "ioctl stereo error \n");
}
fmt = AFMT_S16_LE;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_SETFMT, &fmt) < 0)
{
printf ("ioctl setfmt error \n");
fprintf(stderr, "ioctl setfmt error \n");
}
#endif
}
if (opts->split == 1)
{
printf ("Audio In Device: %s\n", opts->audio_in_dev);
fprintf(stderr, "Audio In Device: %s\n", opts->audio_in_dev);
}
else
{
printf ("Audio In/Out Device: %s\n", opts->audio_in_dev);
fprintf(stderr, "Audio In/Out Device: %s\n", opts->audio_in_dev);
}
#endif
}

View File

@ -29,7 +29,7 @@ void cleanupAndExit(dsd_opts * opts, dsd_state * state)
closeWavOutFile (opts, state);
}
#endif
printf("dsd::cleanupAndExit: Exiting.\n");
fprintf(stderr, "dsd::cleanupAndExit: Exiting.\n");
int rc = 0;
pthread_exit(&rc);
}

View File

@ -111,40 +111,40 @@ getDibit (dsd_opts * opts, dsd_state * state)
if (state->symbolcnt > (4800 / opts->scoperate))
{
state->symbolcnt = 0;
printf ("\n");
printf ("Demod mode: %s Nac: %4X\n", modulation, state->nac);
printf ("Frame Type: %s Talkgroup: %7i\n", state->ftype, state->lasttg);
printf ("Frame Subtype: %s Source: %12i\n", state->fsubtype, state->lastsrc);
printf ("TDMA activity: %s %s Voice errors: %s\n", state->slot0light, state->slot1light, state->err_str);
printf ("+----------------------------------------------------------------+\n");
fprintf(stderr, "\n");
fprintf(stderr, "Demod mode: %s Nac: %4X\n", modulation, state->nac);
fprintf(stderr, "Frame Type: %s Talkgroup: %7i\n", state->ftype, state->lasttg);
fprintf(stderr, "Frame Subtype: %s Source: %12i\n", state->fsubtype, state->lastsrc);
fprintf(stderr, "TDMA activity: %s %s Voice errors: %s\n", state->slot0light, state->slot1light, state->err_str);
fprintf(stderr, "+----------------------------------------------------------------+\n");
for (i = 0; i < 10; i++)
{
printf ("|");
fprintf(stderr, "|");
for (j = 0; j < 64; j++)
{
if (i == 0)
{
if ((j == ((state->min) + 32768) / 1024) || (j == ((state->max) + 32768) / 1024))
{
printf ("#");
fprintf(stderr, "#");
}
else if ((j == ((state->lmid) + 32768) / 1024) || (j == ((state->umid) + 32768) / 1024))
{
printf ("^");
fprintf(stderr, "^");
}
else if (j == (state->center + 32768) / 1024)
{
printf ("!");
fprintf(stderr, "!");
}
else
{
if (j == 32)
{
printf ("|");
fprintf(stderr, "|");
}
else
{
printf (" ");
fprintf(stderr, " ");
}
}
}
@ -152,24 +152,24 @@ getDibit (dsd_opts * opts, dsd_state * state)
{
if (spectrum[j] > 9 - i)
{
printf ("*");
fprintf(stderr, "*");
}
else
{
if (j == 32)
{
printf ("|");
fprintf(stderr, "|");
}
else
{
printf (" ");
fprintf(stderr, " ");
}
}
}
}
printf ("|\n");
fprintf(stderr, "|\n");
}
printf ("+----------------------------------------------------------------+\n");
fprintf(stderr, "+----------------------------------------------------------------+\n");
}
}
}

View File

@ -28,18 +28,18 @@ void printFrameInfo(dsd_opts * opts, dsd_state * state)
level = (int) state->max / 164;
if (opts->verbose > 0)
{
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
if (state->nac != 0)
{
printf("nac: %4X ", state->nac);
fprintf(stderr, "nac: %4X ", state->nac);
}
if (opts->verbose > 1)
{
printf("src: %8i ", state->lastsrc);
fprintf(stderr, "src: %8i ", state->lastsrc);
}
printf("tg: %5i ", state->lasttg);
fprintf(stderr, "tg: %5i ", state->lasttg);
}
void processFrame(dsd_opts * opts, dsd_state * state)
@ -75,7 +75,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->verbose > 0)
{
level = (int) state->max / 164;
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
}
state->nac = 0;
@ -98,7 +98,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->verbose > 0)
{
level = (int) state->max / 164;
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
}
state->nac = 0;
@ -120,7 +120,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->verbose > 0)
{
level = (int) state->max / 164;
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
}
state->nac = 0;
@ -142,7 +142,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->verbose > 0)
{
level = (int) state->max / 164;
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
}
state->nac = 0;
@ -165,7 +165,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->verbose > 0)
{
level = (int) state->max / 164;
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
}
if ((state->synctype == 11) || (state->synctype == 12))
@ -223,7 +223,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->verbose > 0)
{
level = (int) state->max / 164;
printf("inlvl: %2i%% ", level);
fprintf(stderr, "inlvl: %2i%% ", level);
}
}
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL))
@ -259,7 +259,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" HDU\n");
fprintf(stderr, " HDU\n");
}
if (opts->mbe_out_dir[0] != 0)
{
@ -279,7 +279,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" LDU1 ");
fprintf(stderr, " LDU1 ");
}
if (opts->mbe_out_dir[0] != 0)
{
@ -300,7 +300,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" Ignoring LDU2 not preceeded by LDU1\n");
fprintf(stderr, " Ignoring LDU2 not preceeded by LDU1\n");
}
state->lastp25type = 0;
sprintf(state->fsubtype, " ");
@ -310,7 +310,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" LDU2 ");
fprintf(stderr, " LDU2 ");
}
if (opts->mbe_out_dir[0] != 0)
{
@ -330,7 +330,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" TDULC\n");
fprintf(stderr, " TDULC\n");
}
if (opts->mbe_out_dir[0] != 0)
{
@ -358,7 +358,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" TDU\n");
fprintf(stderr, " TDU\n");
}
if (opts->mbe_out_f != NULL)
{
@ -378,7 +378,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" TSDU\n");
fprintf(stderr, " TSDU\n");
}
if (opts->resume > 0)
{
@ -395,7 +395,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" PDU\n");
fprintf(stderr, " PDU\n");
}
if (opts->resume > 0)
{
@ -417,7 +417,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf("(LDU2) ");
fprintf(stderr, "(LDU2) ");
}
if (opts->mbe_out_dir[0] != 0)
{
@ -436,7 +436,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf("(LDU1) ");
fprintf(stderr, "(LDU1) ");
}
if (opts->mbe_out_dir[0] != 0)
{
@ -455,7 +455,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" (TSDU)\n");
fprintf(stderr, " (TSDU)\n");
}
state->lastp25type = 0;
sprintf(state->fsubtype, "(TSDU) ");
@ -466,7 +466,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" (PDU)\n");
fprintf(stderr, " (PDU)\n");
}
state->lastp25type = 0;
}
@ -477,7 +477,7 @@ void processFrame(dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printFrameInfo(opts, state);
printf(" duid:%s *Unknown DUID*\n", duid);
fprintf(stderr, " duid:%s *Unknown DUID*\n", duid);
}
}
}

View File

@ -26,19 +26,19 @@ printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset,
if (opts->verbose > 0)
{
printf ("Sync: %s ", frametype);
fprintf(stderr, "Sync: %s ", frametype);
}
if (opts->verbose > 2)
{
printf ("o: %4i ", offset);
fprintf(stderr, "o: %4i ", offset);
}
if (opts->verbose > 1)
{
printf ("mod: %s ", modulation);
fprintf(stderr, "mod: %s ", modulation);
}
if (opts->verbose > 2)
{
printf ("g: %f ", state->aout_gain);
fprintf(stderr, "g: %f ", state->aout_gain);
}
}
@ -102,7 +102,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
state->numflips = 0;
if ((opts->symboltiming == 1) && (state->carrier == 1))
{
printf ("\nSymbol Timing:\n");
fprintf(stderr, "\nSymbol Timing:\n");
}
while (sync == 0)
{
@ -256,36 +256,36 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
if (state->symbolcnt > (4800 / opts->scoperate))
{
state->symbolcnt = 0;
printf ("\n");
printf ("Demod mode: %s Nac: %4X\n", modulation, state->nac);
printf ("Frame Type: %s Talkgroup: %7i\n", state->ftype, state->lasttg);
printf ("Frame Subtype: %s Source: %12i\n", state->fsubtype, state->lastsrc);
printf ("TDMA activity: %s %s Voice errors: %s\n", state->slot0light, state->slot1light, state->err_str);
printf ("+----------------------------------------------------------------+\n");
fprintf(stderr, "\n");
fprintf(stderr, "Demod mode: %s Nac: %4X\n", modulation, state->nac);
fprintf(stderr, "Frame Type: %s Talkgroup: %7i\n", state->ftype, state->lasttg);
fprintf(stderr, "Frame Subtype: %s Source: %12i\n", state->fsubtype, state->lastsrc);
fprintf(stderr, "TDMA activity: %s %s Voice errors: %s\n", state->slot0light, state->slot1light, state->err_str);
fprintf(stderr, "+----------------------------------------------------------------+\n");
for (i = 0; i < 10; i++)
{
printf ("|");
fprintf(stderr, "|");
for (j = 0; j < 64; j++)
{
if (i == 0)
{
if ((j == ((state->min) + 32768) / 1024) || (j == ((state->max) + 32768) / 1024))
{
printf ("#");
fprintf(stderr, "#");
}
else if (j == (state->center + 32768) / 1024)
{
printf ("!");
fprintf(stderr, "!");
}
else
{
if (j == 32)
{
printf ("|");
fprintf(stderr, "|");
}
else
{
printf (" ");
fprintf(stderr, " ");
}
}
}
@ -293,24 +293,24 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
{
if (spectrum[j] > 9 - i)
{
printf ("*");
fprintf(stderr, "*");
}
else
{
if (j == 32)
{
printf ("|");
fprintf(stderr, "|");
}
else
{
printf (" ");
fprintf(stderr, " ");
}
}
}
}
printf ("|\n");
fprintf(stderr, "|\n");
}
printf ("+----------------------------------------------------------------+\n");
fprintf(stderr, "+----------------------------------------------------------------+\n");
}
}
}
@ -825,7 +825,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
{
if ((opts->errorbars == 1) && (opts->verbose > 1) && (state->carrier == 1))
{
printf ("Sync: no sync\n");
fprintf(stderr, "Sync: no sync\n");
}
noCarrier (opts, state);
return (-1);

View File

@ -31,7 +31,7 @@ playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv)
sprintf (opts->mbe_in_file, "%s", argv[i]);
openMbeInFile (opts, state);
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
printf ("playing %s\n", opts->mbe_in_file);
fprintf (stderr, "playing %s\n", opts->mbe_in_file);
while (feof (opts->mbe_in_f) == 0)
{
if (state->mbe_file_type == 0)
@ -133,7 +133,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
if (opts->errorbars == 1)
{
printf ("%s", state->err_str);
fprintf(stderr, "%s", state->err_str);
}
processAudio (opts, state);

View File

@ -12,7 +12,7 @@ openSerial (dsd_opts * opts, dsd_state * state)
opts->serial_fd = open (opts->serial_dev, O_WRONLY);
if (opts->serial_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->serial_dev);
fprintf(stderr, "Error, couldn't open %s\n", opts->serial_dev);
exit (1);
}

View File

@ -104,7 +104,7 @@ int getSymbol(dsd_opts * opts, dsd_state * state, int have_sync)
state->input_length = 0; // states all samples have been consumed
state->output_num_samples = state->output_offset;
//fprintf(stderr, "dsd::getSymbol: input processing has finished\n");
//ffprintf(stderr, stderr, "dsd::getSymbol: input processing has finished\n");
if (state->output_num_samples > state->output_length)
{
@ -141,7 +141,7 @@ int getSymbol(dsd_opts * opts, dsd_state * state, int have_sync)
}
}
#endif
// printf("res: %zd\n, offset: %lld", result, sf_seek(opts->audio_in_file, 0, SEEK_CUR));
// fprintf(stderr, "res: %zd\n, offset: %lld", result, sf_seek(opts->audio_in_file, 0, SEEK_CUR));
// process sample
if (opts->use_cosine_filter)
@ -184,14 +184,14 @@ int getSymbol(dsd_opts * opts, dsd_state * state, int have_sync)
}
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf("O");
fprintf(stderr, "O");
}
}
else
{
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf("+");
fprintf(stderr, "+");
}
if ((state->jitter < 0) && (state->lastsample < state->center) && (state->rf_mod != 1))
{ // first transition edge
@ -218,14 +218,14 @@ int getSymbol(dsd_opts * opts, dsd_state * state, int have_sync)
if ((opts->symboltiming == 1) && (have_sync == 0)
&& (state->lastsynctype != -1))
{
printf("X");
fprintf(stderr, "X");
}
}
else
{
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf("-");
fprintf(stderr, "-");
}
if ((state->jitter < 0) && (state->lastsample > state->center) && (state->rf_mod != 1))
{ // first transition edge
@ -267,11 +267,11 @@ int getSymbol(dsd_opts * opts, dsd_state * state, int have_sync)
{
if (state->jitter >= 0)
{
printf(" %i\n", state->jitter);
fprintf(stderr, " %i\n", state->jitter);
}
else
{
printf("\n");
fprintf(stderr, "\n");
}
}

View File

@ -17,7 +17,7 @@
/*
* Note: D-STAR support is fairly complete at this point.
* The ambe3600x2450 decoder is similar butnot compatible with D-STAR voice frames.
* The ambe3600x2450 decoder is similar butnot compatible with D-STAR voice frames.
* The dstar interleave pattern is different as well.
* GMSK modulation optimizations will also required to get a usable bit error
*/
@ -40,11 +40,11 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
const int *w, *x;
if (opts->errorbars == 1) {
printf("e:");
fprintf(stderr, "e:");
}
#ifdef DSTAR_DUMP
printf ("\n");
fprintf(stderr, "\n");
#endif
if (state->synctype == 18) {
@ -74,7 +74,7 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
}
if ((bitbuffer & 0x00FFFFFF) == 0x00AAB468) {
// we're slipping bits
printf("sync in voice after i=%d, restarting\n", i);
fprintf(stderr, "sync in voice after i=%d, restarting\n", i);
//ugh just start over
i = 0;
w = dW;
@ -101,7 +101,7 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
if ((bitbuffer & 0x00FFFFFF) == 0x00AAB468) {
// looking if we're slipping bits
if (i != 96) {
printf("sync after i=%d\n", i);
fprintf(stderr, "sync after i=%d\n", i);
i = 96;
}
}
@ -114,31 +114,31 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
if ((bitbuffer & 0x00FFFFFF) == 0x00AAB468) {
//We got sync!
//printf("Sync on framecount = %d\n", framecount);
//fprintf(stderr, "Sync on framecount = %d\n", framecount);
sync_missed = 0;
} else if ((bitbuffer & 0x00FFFFFF) == 0xAAAAAA) {
//End of transmission
printf("End of transmission\n");
fprintf(stderr, "End of transmission\n");
goto end;
} else if (framecount % 21 == 0) {
printf("Missed sync on framecount = %d, value = %x/%x/%x\n",
fprintf(stderr, "Missed sync on framecount = %d, value = %x/%x/%x\n",
framecount, slowdata[0], slowdata[1], slowdata[2]);
sync_missed++;
} else if (framecount != 0 && (bitbuffer & 0x00FFFFFF) != 0x000000) {
slowdata[0] ^= 0x70;
slowdata[1] ^= 0x4f;
slowdata[2] ^= 0x93;
//printf("unscrambled- %s",slowdata);
//fprintf(stderr, "unscrambled- %s",slowdata);
} else if (framecount == 0) {
//printf("never scrambled-%s\n",slowdata);
//fprintf(stderr, "never scrambled-%s\n",slowdata);
}
framecount++;
}
end: if (opts->errorbars == 1) {
printf("\n");
fprintf(stderr, "\n");
}
}

View File

@ -49,28 +49,28 @@ void dstar_header_decode(int radioheaderbuffer[660]) {
}
}
// print header
printf("\nDSTAR HEADER: ");
//printf("FLAG1: %02X - FLAG2: %02X - FLAG3: %02X\n", radioheader[0],
fprintf(stderr, "\nDSTAR HEADER: ");
//fprintf(stderr, "FLAG1: %02X - FLAG2: %02X - FLAG3: %02X\n", radioheader[0],
// radioheader[1], radioheader[2]);
printf("RPT 2: %c%c%c%c%c%c%c%c ", radioheader[3], radioheader[4],
fprintf(stderr, "RPT 2: %c%c%c%c%c%c%c%c ", radioheader[3], radioheader[4],
radioheader[5], radioheader[6], radioheader[7], radioheader[8],
radioheader[9], radioheader[10]);
printf("RPT 1: %c%c%c%c%c%c%c%c ", radioheader[11], radioheader[12],
fprintf(stderr, "RPT 1: %c%c%c%c%c%c%c%c ", radioheader[11], radioheader[12],
radioheader[13], radioheader[14], radioheader[15], radioheader[16],
radioheader[17], radioheader[18]);
printf("YOUR: %c%c%c%c%c%c%c%c ", radioheader[19], radioheader[20],
fprintf(stderr, "YOUR: %c%c%c%c%c%c%c%c ", radioheader[19], radioheader[20],
radioheader[21], radioheader[22], radioheader[23], radioheader[24],
radioheader[25], radioheader[26]);
printf("MY: %c%c%c%c%c%c%c%c/%c%c%c%c\n", radioheader[27],
fprintf(stderr, "MY: %c%c%c%c%c%c%c%c/%c%c%c%c\n", radioheader[27],
radioheader[28], radioheader[29], radioheader[30], radioheader[31],
radioheader[32], radioheader[33], radioheader[34], radioheader[35],
radioheader[36], radioheader[37], radioheader[38]);
//FCSinheader = ((radioheader[39] << 8) | radioheader[40]) & 0xFFFF;
//FCScalculated = calc_fcs((unsigned char*) radioheader, 39);
//printf("Check sum = %04X ", FCSinheader);
//fprintf(stderr, "Check sum = %04X ", FCSinheader);
//if (FCSinheader == FCScalculated) {
// printf("(OK)\n");
// fprintf(stderr, "(OK)\n");
//} else {
// printf("(NOT OK- Calculated FCS = %04X)\n", FCScalculated);
// fprintf(stderr, "(NOT OK- Calculated FCS = %04X)\n", FCScalculated);
//}; // end else - if
}

View File

@ -11,11 +11,11 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("VOICE e:");
fprintf(stderr, "VOICE e:");
}
#ifdef NXDN_DUMP
printf ("\n");
fprintf(stderr, "\n");
#endif
for (k = 0; k < 4; k++)
@ -24,11 +24,11 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
}
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
if (k < 3)
@ -43,7 +43,7 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
ambe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr[*y][*z] = (1 & dibit); // bit 0
@ -54,7 +54,7 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
}
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
}
}
@ -70,7 +70,7 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
ambe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr[*y][*z] = (1 & dibit); // bit 0
@ -81,7 +81,7 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
}
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
}
}
@ -92,11 +92,11 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
}
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
}
@ -106,19 +106,19 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
}
}
}
#ifdef NXDN_DUMP
printf ("\n");
fprintf(stderr, "\n");
#endif
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
}

View File

@ -7,30 +7,30 @@ processNXDNData (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("DATA ");
fprintf(stderr, "DATA ");
}
for (i = 0; i < 30; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
}
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
for (i = 0; i < 144; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
}
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
}

View File

@ -11,18 +11,18 @@ processNXDNVoice (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("VOICE e:");
fprintf(stderr, "VOICE e:");
}
for (i = 0; i < 30; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
}
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
pr = nxdnpr;
@ -36,7 +36,7 @@ processNXDNVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
fprintf(stderr, "%c", dibit + 48);
#endif
ambe_fr[*w][*x] = *pr ^ (1 & (dibit >> 1)); // bit 1
pr++;
@ -48,12 +48,12 @@ processNXDNVoice (dsd_opts * opts, dsd_state * state)
}
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
#ifdef NXDN_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
}
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
}

View File

@ -12,10 +12,10 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
if (opts->p25lc == 1)
{
printf ("lcformat: %s mfid: %s lcinfo: %s ", lcformat, mfid, lcinfo);
fprintf(stderr, "lcformat: %s mfid: %s lcinfo: %s ", lcformat, mfid, lcinfo);
if (opts->p25tg == 0)
{
printf ("\n");
fprintf(stderr, "\n");
}
}
@ -46,12 +46,12 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
}
if (opts->p25tg == 1)
{
printf ("tg: %li ", talkgroup);
fprintf(stderr, "tg: %li ", talkgroup);
}
if (opts->p25tg == 1)
{
printf ("tg: %li ", talkgroup);
fprintf(stderr, "tg: %li ", talkgroup);
// the remaining 3 appear to be other active tg's on the system
j = 0;
@ -66,7 +66,7 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
tmpstr[15] = 48;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
printf ("%li ", talkgroup);
fprintf(stderr, "%li ", talkgroup);
j = 0;
for (i = 16; i < 28; i++)
{
@ -79,7 +79,7 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
tmpstr[15] = 48;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
printf ("%li ", talkgroup);
fprintf(stderr, "%li ", talkgroup);
j = 0;
for (i = 4; i < 16; i++)
{
@ -92,7 +92,7 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
tmpstr[15] = 48;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
printf ("%li\n", talkgroup);
fprintf(stderr, "%li\n", talkgroup);
}
}
@ -136,7 +136,7 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
}
if (opts->p25tg == 1)
{
printf ("tg: %li ", talkgroup);
fprintf(stderr, "tg: %li ", talkgroup);
}
j = 0;
@ -150,11 +150,11 @@ processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, c
state->lastsrc = source;
if (opts->p25tg == 1)
{
printf ("src: %li emr: %c\n", source, lcinfo[0]);
fprintf(stderr, "src: %li emr: %c\n", source, lcinfo[0]);
}
}
else if ((opts->p25tg == 1) && (opts->p25lc == 1))
{
printf ("\n");
fprintf(stderr, "\n");
}
}

View File

@ -264,14 +264,14 @@ processHDU (dsd_opts * opts, dsd_state * state)
{
algidhex = strtol (algid, NULL, 2);
kidhex = strtol (kid, NULL, 2);
printf ("mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
fprintf(stderr, "mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
}
if (opts->p25lc == 1)
{
printf ("mfid: %s tgid: %s ", mfid, tgid);
fprintf(stderr, "mfid: %s tgid: %s ", mfid, tgid);
if (opts->p25tg == 0)
{
printf ("\n");
fprintf(stderr, "\n");
}
}
@ -313,6 +313,6 @@ processHDU (dsd_opts * opts, dsd_state * state)
}
if (opts->p25tg == 1)
{
printf ("tg: %li\n", talkgroup);
fprintf(stderr, "tg: %li\n", talkgroup);
}
}

View File

@ -42,7 +42,7 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("e:");
fprintf(stderr, "e:");
}
// separate imbe frames and deinterleave
@ -286,12 +286,12 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
if (opts->p25status == 1)
{
printf ("status: %s lsd1: %s lsd2: %s\n", status, lsd1, lsd2);
fprintf(stderr, "status: %s lsd1: %s lsd2: %s\n", status, lsd1, lsd2);
}
processP25lcw (opts, state, lcformat, mfid, lcinfo);

View File

@ -44,7 +44,7 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("e:");
fprintf(stderr, "e:");
}
// separate imbe frames and deinterleave
@ -339,17 +339,17 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
if (opts->p25status == 1)
{
printf ("status: %s lsd3: %s lsd4: %s\n", status, lsd3, lsd4);
fprintf(stderr, "status: %s lsd3: %s lsd4: %s\n", status, lsd3, lsd4);
}
if (opts->p25enc == 1)
{
algidhex = strtol (algid, NULL, 2);
kidhex = strtol (kid, NULL, 2);
printf ("mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
fprintf(stderr, "mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
}
}

View File

@ -12,18 +12,18 @@ processProVoice (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("VOICE e:");
fprintf(stderr, "VOICE e:");
}
for (i = 0; i < 64; i++)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
// lid
@ -31,22 +31,22 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
for (i = 0; i < 64; i++)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
// imbe frames 1,2 first half
@ -59,14 +59,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -74,14 +74,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
}
@ -89,14 +89,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -104,25 +104,25 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
// spacer bits
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
printf (" ");
fprintf(stderr, "%i", dibit);
fprintf(stderr, " ");
#endif
// imbe frames 1,2 second half
@ -131,14 +131,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
for (i = 0; i < 3; i++)
@ -147,14 +147,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -162,14 +162,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
}
@ -177,14 +177,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 5;
x -= 5;
@ -192,14 +192,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
for (i = 0; i < 7; i++)
@ -208,14 +208,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -223,14 +223,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
}
@ -238,14 +238,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 5;
x -= 5;
@ -253,14 +253,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr1);
@ -269,23 +269,23 @@ processProVoice (dsd_opts * opts, dsd_state * state)
// spacer bits
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
printf (" ");
fprintf(stderr, "%i", dibit);
fprintf(stderr, " ");
#endif
for (i = 0; i < 16; i++)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
// imbe frames 3,4 first half
@ -297,14 +297,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -312,28 +312,28 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
}
for (j = 0; j < 6; j++)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -341,25 +341,25 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
// spacer bits
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
printf ("_");
fprintf(stderr, "%i", dibit);
fprintf(stderr, "_");
#endif
// imbe frames 3,4 second half
@ -367,14 +367,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
for (i = 0; i < 3; i++)
{
@ -382,14 +382,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -397,14 +397,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
}
@ -412,14 +412,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 5;
x -= 5;
@ -427,14 +427,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
for (i = 0; i < 7; i++)
@ -443,14 +443,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 6;
x -= 6;
@ -458,14 +458,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
}
@ -473,14 +473,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr1[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf ("_");
fprintf(stderr, "_");
#endif
w -= 5;
x -= 5;
@ -488,14 +488,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
{
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
imbe7100_fr2[*w][*x] = dibit;
w++;
x++;
}
#ifdef PROVOICE_DUMP
printf (" ");
fprintf(stderr, " ");
#endif
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr1);
@ -504,16 +504,16 @@ processProVoice (dsd_opts * opts, dsd_state * state)
// spacer bits
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
fprintf(stderr, "%i", dibit);
#endif
dibit = getDibit (opts, state);
#ifdef PROVOICE_DUMP
printf ("%i", dibit);
printf (" ");
fprintf(stderr, "%i", dibit);
fprintf(stderr, " ");
#endif
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
}

View File

@ -83,7 +83,7 @@ processX2TDMAdata (dsd_opts * opts, dsd_state * state)
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
fprintf(stderr, "%s ", cachbits);
#endif
// current slot
@ -204,7 +204,7 @@ processX2TDMAdata (dsd_opts * opts, dsd_state * state)
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
fprintf(stderr, "%s ", syncbits);
#endif
if ((strcmp (sync, X2TDMA_BS_DATA_SYNC) == 0) || (strcmp (sync, X2TDMA_BS_DATA_SYNC) == 0))
@ -221,7 +221,7 @@ processX2TDMAdata (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("%s %s ", state->slot0light, state->slot1light);
fprintf(stderr, "%s %s ", state->slot0light, state->slot1light);
}
// current slot second half, cach, next slot 1st half
@ -231,11 +231,11 @@ processX2TDMAdata (dsd_opts * opts, dsd_state * state)
{
if (strcmp (state->fsubtype, " ") == 0)
{
printf (" Unknown burst type: %s\n", bursttype);
fprintf(stderr, " Unknown burst type: %s\n", bursttype);
}
else
{
printf ("%s\n", state->fsubtype);
fprintf(stderr, "%s\n", state->fsubtype);
}
}
}

View File

@ -127,7 +127,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
fprintf(stderr, "%s ", cachbits);
#endif
// current slot frame 1
@ -240,7 +240,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
if ((j == 0) && (opts->errorbars == 1))
{
printf ("%s %s VOICE e:", state->slot0light, state->slot1light);
fprintf(stderr, "%s %s VOICE e:", state->slot0light, state->slot1light);
}
#ifdef X2TDMA_DUMP
@ -254,7 +254,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
fprintf(stderr, "%s ", syncbits);
#endif
if (j == 1)
@ -554,7 +554,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
fprintf(stderr, "%s ", cachbits);
#endif
@ -605,7 +605,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
fprintf(stderr, "%s ", syncbits);
#endif
if (j == 5)
@ -623,7 +623,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
if (opts->errorbars == 1)
{
printf ("\n");
fprintf(stderr, "\n");
}
if (mutecurrentslot == 0)
@ -636,7 +636,7 @@ processX2TDMAvoice (dsd_opts * opts, dsd_state * state)
{
algidhex = strtol (state->algid, NULL, 2);
kidhex = strtol (state->keyid, NULL, 2);
printf ("mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
fprintf(stderr, "mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
}
}
}