mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-20 04:37:26 -05:00
Fix STDIN, file playback, and WAV file creation
Fix STDIN and file playback set rate out to 8000 when calling for any of these methods
This commit is contained in:
@@ -117,6 +117,7 @@ void playRawAudio(dsd_opts * opts, dsd_state * state) {
|
|||||||
if (opts->audio_out_type == 0){
|
if (opts->audio_out_type == 0){
|
||||||
//write (opts->audio_out_fd, (void*)&obuf, outl);
|
//write (opts->audio_out_fd, (void*)&obuf, outl);
|
||||||
pa_simple_write(opts->pulse_raw_dev_out, (void*)&obuf, 2, NULL);
|
pa_simple_write(opts->pulse_raw_dev_out, (void*)&obuf, 2, NULL);
|
||||||
|
//printf("writing samples");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PORTAUDIO //no idea if this method will work, since I can't test it
|
#ifdef USE_PORTAUDIO //no idea if this method will work, since I can't test it
|
||||||
@@ -308,6 +309,7 @@ writeSynthesizedVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sf_write_short(opts->wav_out_f, aout_buf, 160);
|
sf_write_short(opts->wav_out_f, aout_buf, 160);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
int n;
|
int n;
|
||||||
@@ -396,16 +398,13 @@ playSynthesizedVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (opts->monitor_input_audio == 1){
|
//if (opts->monitor_input_audio == 1){
|
||||||
pa_simple_flush(opts->pulse_raw_dev_in, NULL);
|
//pa_simple_flush(opts->pulse_raw_dev_in, NULL);
|
||||||
pa_simple_flush(opts->pulse_raw_dev_out, NULL);
|
//pa_simple_flush(opts->pulse_raw_dev_out, NULL);
|
||||||
}
|
//}
|
||||||
|
|
||||||
pa_simple_write(opts->pulse_digi_dev_out, (state->audio_out_buf_p - state->audio_out_idx), (state->audio_out_idx * 2), NULL); //Yay! It works.
|
pa_simple_write(opts->pulse_digi_dev_out, (state->audio_out_buf_p - state->audio_out_idx), (state->audio_out_idx * 2), NULL); //Yay! It works.
|
||||||
state->audio_out_idx = 0;
|
state->audio_out_idx = 0;
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->audio_out_idx2 >= 800000)
|
if (state->audio_out_idx2 >= 800000)
|
||||||
@@ -610,6 +609,7 @@ openAudioInDevice (dsd_opts * opts)
|
|||||||
opts->audio_in_type = 1;
|
opts->audio_in_type = 1;
|
||||||
opts->audio_in_file_info = calloc(1, sizeof(SF_INFO));
|
opts->audio_in_file_info = calloc(1, sizeof(SF_INFO));
|
||||||
opts->audio_in_file_info->samplerate=48000;
|
opts->audio_in_file_info->samplerate=48000;
|
||||||
|
opts->pulse_digi_rate_out = 8000; //set out rate to 8000 for stdin input
|
||||||
opts->audio_in_file_info->channels=1;
|
opts->audio_in_file_info->channels=1;
|
||||||
opts->audio_in_file_info->seekable=0;
|
opts->audio_in_file_info->seekable=0;
|
||||||
opts->audio_in_file_info->format=SF_FORMAT_RAW|SF_FORMAT_PCM_16|SF_ENDIAN_LITTLE;
|
opts->audio_in_file_info->format=SF_FORMAT_RAW|SF_FORMAT_PCM_16|SF_ENDIAN_LITTLE;
|
||||||
@@ -617,7 +617,7 @@ openAudioInDevice (dsd_opts * opts)
|
|||||||
|
|
||||||
if(opts->audio_in_file == NULL) {
|
if(opts->audio_in_file == NULL) {
|
||||||
printf ("Error, couldn't open stdin with libsndfile: %s\n", sf_strerror(NULL));
|
printf ("Error, couldn't open stdin with libsndfile: %s\n", sf_strerror(NULL));
|
||||||
//exit(1);
|
exit(1); //had this one disabled, re-enabling it now
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strncmp(opts->audio_in_dev, "pa:", 2) == 0)
|
else if(strncmp(opts->audio_in_dev, "pa:", 2) == 0)
|
||||||
@@ -659,6 +659,7 @@ openAudioInDevice (dsd_opts * opts)
|
|||||||
if (S_ISREG(stat_buf.st_mode))
|
if (S_ISREG(stat_buf.st_mode))
|
||||||
{
|
{
|
||||||
// is this a regular file? then process with libsndfile.
|
// is this a regular file? then process with libsndfile.
|
||||||
|
//opts->pulse_digi_rate_out = 8000; //this for wav files input?
|
||||||
opts->audio_in_type = 1;
|
opts->audio_in_type = 1;
|
||||||
opts->audio_in_file_info = calloc(1, sizeof(SF_INFO));
|
opts->audio_in_file_info = calloc(1, sizeof(SF_INFO));
|
||||||
opts->audio_in_file_info->channels = 1;
|
opts->audio_in_file_info->channels = 1;
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ openWavOutFile (dsd_opts * opts, dsd_state * state)
|
|||||||
// opts->wav_out_f = fopen (opts->wav_out_file, "w");
|
// opts->wav_out_f = fopen (opts->wav_out_file, "w");
|
||||||
|
|
||||||
SF_INFO info;
|
SF_INFO info;
|
||||||
info.samplerate = 8000;
|
info.samplerate = 8000; //8000
|
||||||
info.channels = 1;
|
info.channels = 1;
|
||||||
info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16 | SF_ENDIAN_LITTLE;
|
info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16 | SF_ENDIAN_LITTLE;
|
||||||
opts->wav_out_f = sf_open (opts->wav_out_file, SFM_WRITE, &info);
|
opts->wav_out_f = sf_open (opts->wav_out_file, SFM_WRITE, &info);
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
//printf("now=%d\n", now); //okay, so this is incrementing as expected
|
//printf("now=%d\n", now); //okay, so this is incrementing as expected
|
||||||
if ( opts->monitor_input_audio == 1 && (time(NULL) - now) > 1 ) //okay, still something going on, still doing the read part for some reason
|
if ( opts->monitor_input_audio == 1 && (time(NULL) - now) > 1 ) //okay, still something going on, still doing the read part for some reason
|
||||||
{
|
{
|
||||||
playRawAudio(opts, state); //this is on line 21 in dsd_audio.c
|
//playRawAudio(opts, state); //this is on line 21 in dsd_audio.c
|
||||||
}
|
}
|
||||||
|
|
||||||
t++;
|
t++;
|
||||||
|
|||||||
@@ -764,7 +764,7 @@ main (int argc, char **argv)
|
|||||||
opts.frame_nxdn48 = 0;
|
opts.frame_nxdn48 = 0;
|
||||||
opts.frame_nxdn96 = 0;
|
opts.frame_nxdn96 = 0;
|
||||||
opts.frame_dmr = 1;
|
opts.frame_dmr = 1;
|
||||||
opts.frame_provoice = 0;
|
opts.frame_provoice = 0; //turn it on, doesn't work due to symbol rate difference
|
||||||
}
|
}
|
||||||
else if (optarg[0] == 'd')
|
else if (optarg[0] == 'd')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||||||
// TODO: need to read demodulated stream here
|
// TODO: need to read demodulated stream here
|
||||||
get_rtlsdr_sample(&sample);
|
get_rtlsdr_sample(&sample);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,18 +15,18 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
//strftime (datestr, 31, "%Y-%m-%d-%H%M%S", &timep);
|
//strftime (datestr, 31, "%Y-%m-%d-%H%M%S", &timep);
|
||||||
//printf ("%s VOICE e:", datestr);
|
//printf ("%s VOICE e:", datestr);
|
||||||
//printf ("VOICE e:");
|
printf ("VOICE e:");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// lid
|
// lid
|
||||||
@@ -34,22 +34,22 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// imbe frames 1,2 first half
|
// imbe frames 1,2 first half
|
||||||
@@ -77,14 +77,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,14 +92,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr1[*w][*x] = dibit;
|
imbe7100_fr1[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 6;
|
w -= 6;
|
||||||
x -= 6;
|
x -= 6;
|
||||||
@@ -107,25 +107,25 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// spacer bits
|
// spacer bits
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// imbe frames 1,2 second half
|
// imbe frames 1,2 second half
|
||||||
@@ -134,14 +134,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
@@ -150,14 +150,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr1[*w][*x] = dibit;
|
imbe7100_fr1[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 6;
|
w -= 6;
|
||||||
x -= 6;
|
x -= 6;
|
||||||
@@ -165,14 +165,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,14 +180,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr1[*w][*x] = dibit;
|
imbe7100_fr1[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 5;
|
w -= 5;
|
||||||
x -= 5;
|
x -= 5;
|
||||||
@@ -195,14 +195,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < 7; i++)
|
for (i = 0; i < 7; i++)
|
||||||
@@ -218,7 +218,7 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 6;
|
w -= 6;
|
||||||
x -= 6;
|
x -= 6;
|
||||||
@@ -226,14 +226,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,14 +241,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr1[*w][*x] = dibit;
|
imbe7100_fr1[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 5;
|
w -= 5;
|
||||||
x -= 5;
|
x -= 5;
|
||||||
@@ -256,14 +256,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr1);
|
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr1);
|
||||||
@@ -272,23 +272,23 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
// spacer bits
|
// spacer bits
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// imbe frames 3,4 first half
|
// imbe frames 3,4 first half
|
||||||
@@ -300,14 +300,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr1[*w][*x] = dibit;
|
imbe7100_fr1[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 6;
|
w -= 6;
|
||||||
x -= 6;
|
x -= 6;
|
||||||
@@ -315,28 +315,28 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
for (j = 0; j < 6; j++)
|
for (j = 0; j < 6; j++)
|
||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr1[*w][*x] = dibit;
|
imbe7100_fr1[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("_");
|
printf ("_");
|
||||||
#endif
|
#endif
|
||||||
w -= 6;
|
w -= 6;
|
||||||
x -= 6;
|
x -= 6;
|
||||||
@@ -344,14 +344,14 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
dibit = getDibit (opts, state);
|
dibit = getDibit (opts, state);
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf ("%i", dibit);
|
printf ("%i", dibit);
|
||||||
#endif
|
#endif
|
||||||
imbe7100_fr2[*w][*x] = dibit;
|
imbe7100_fr2[*w][*x] = dibit;
|
||||||
w++;
|
w++;
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#ifdef PROVOICE_DUMP
|
#ifdef PROVOICE_DUMP
|
||||||
//printf (" ");
|
printf (" ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// spacer bits
|
// spacer bits
|
||||||
|
|||||||
@@ -1054,7 +1054,7 @@ void open_rtlsdr_stream(dsd_opts *opts)
|
|||||||
int r;
|
int r;
|
||||||
rtl_bandwidth = opts->rtl_bandwidth * 1000; //multiple by 1000 to get rate
|
rtl_bandwidth = opts->rtl_bandwidth * 1000; //multiple by 1000 to get rate
|
||||||
//rtl_bandwidth = 48000;
|
//rtl_bandwidth = 48000;
|
||||||
bandwidth_multiplier = (bandwidth_divisor / rtl_bandwidth); //find multiple with no remainder if oddball number entered
|
bandwidth_multiplier = (bandwidth_divisor / rtl_bandwidth);
|
||||||
//bandwidth_multiplier = 1;
|
//bandwidth_multiplier = 1;
|
||||||
dongle_init(&dongle);
|
dongle_init(&dongle);
|
||||||
demod_init(&demod);
|
demod_init(&demod);
|
||||||
|
|||||||
Reference in New Issue
Block a user