Start on rtlsdr

This commit is contained in:
Jared Szechy
2021-01-16 18:29:20 -05:00
parent 290a2204ba
commit 502607a608
8 changed files with 1075 additions and 13 deletions

View File

@@ -88,18 +88,26 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
cleanupAndExit (opts, state);
}
}
else
{
else if (opts->audio_in_type == 2)
{
#ifdef USE_PORTAUDIO
PaError err = Pa_ReadStream( opts->audio_in_pa_stream, &sample, 1 );
if( err != paNoError )
{
fprintf( stderr, "An error occured while using the portaudio input stream\n" );
fprintf( stderr, "Error number: %d\n", err );
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
}
PaError err = Pa_ReadStream( opts->audio_in_pa_stream, &sample, 1 );
if( err != paNoError )
{
fprintf( stderr, "An error occured while using the portaudio input stream\n" );
fprintf( stderr, "Error number: %d\n", err );
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
}
#endif
}
}
else if (opts->audio_in_type == 3)
{
#ifdef USE_RTLSDR
// TODO: need to read demodulated stream here
get_rtlsdr_sample(&sample);
printf("sample: %d\n", sample);
#endif
}
#ifdef TRACE_DSD
state->debug_sample_index++;