common code: Add feature to record received audio and replay it

-W <file.wav> writes a wave file of received audio
-R <file.wav> reads a wave file to feed into decoder

This way you can record a phone and later debug without a phone
and radio equipment.
This commit is contained in:
Andreas Eversberg
2016-03-25 13:58:16 +01:00
parent 0aa749d27b
commit 1146537d84
16 changed files with 386 additions and 17 deletions

View File

@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
}
/* create transceiver instance */
rc = anetz_create(sounddev, samplerate, kanal, loopback, lossdetect / 100.0);
rc = anetz_create(sounddev, samplerate, write_wave, read_wave, kanal, loopback, lossdetect / 100.0);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;