PulseAudio

Swap Pulse Audio in for all instance where OSS is used
Lots of other potentially things breaking
This commit is contained in:
lwvmobile
2022-02-08 00:26:14 -05:00
committed by GitHub
parent a4aab9a56d
commit 130afdc278
8 changed files with 1266 additions and 69 deletions

View File

@@ -16,6 +16,22 @@
*/
#include "dsd.h"
/*
pa_simple *c;
pa_sample_spec cc;
void openPulseDigi(dsd_opts * opts){
cc.format = PA_SAMPLE_S16NE;
cc.channels = 1;
//cc.rate = 48000; //for some reason, if INPUT is 8000, and output is 48000, sounds correct on NXDN48
cc.rate = opts->pulse_digi_rate_in;
c = pa_simple_new(NULL, "DSD FME", PA_STREAM_RECORD, NULL, "Digi Audio In", &cc, NULL, NULL, NULL);
}
*/
int
getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
@@ -81,10 +97,9 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
}
// Read the new sample from the input
if(opts->audio_in_type == 0) {
result = read (opts->audio_in_fd, &sample, 2);
if(opts->audio_in_type == 0)
{
pa_simple_read(opts->pulse_digi_dev_in, &sample, 2, NULL );
}
else if (opts->audio_in_type == 1) {
result = sf_read_short(opts->audio_in_file, &sample, 1);