prepare audio handling for multi carrier SDR

This commit is contained in:
Andreas Eversberg
2017-01-03 12:31:59 +01:00
parent 713b1ab118
commit d54d3ac265
23 changed files with 131 additions and 176 deletions

View File

@@ -638,7 +638,7 @@ void process_call(int c)
/* handle audio, if sound device is used */
int16_t samples[call.latspl];
int16_t samples[call.latspl], *spl_list[1];
int count;
int rc;
@@ -670,7 +670,8 @@ void process_call(int c)
default:
jitter_load(&call.audio, up, count);
}
rc = sound_write(call.sound, up, up, count);
spl_list[0] = up;
rc = sound_write(call.sound, spl_list, count, 1);
if (rc < 0) {
PDEBUG(DSENDER, DEBUG_ERROR, "Failed to write TX data to sound device (rc = %d)\n", rc);
if (rc == -EPIPE)
@@ -678,7 +679,8 @@ void process_call(int c)
return;
}
}
count = sound_read(call.sound, samples, samples, call.latspl);
spl_list[0] = samples;
count = sound_read(call.sound, spl_list, call.latspl, 1);
if (count < 0) {
PDEBUG(DSENDER, DEBUG_ERROR, "Failed to read from sound device (rc = %d)!\n", count);
if (count == -EPIPE)