aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/anetz.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-03-25 13:58:16 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2016-03-27 17:56:04 +0200
commit1146537d849c30aa20a4cb742cdd18654f041a8d (patch)
tree9cdc0a47669fc5d4ece4c77972308a7f1de81048 /src/anetz/anetz.c
parent0aa749d27b1c95997a6e324694a7e624988faacc (diff)
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.
Diffstat (limited to 'src/anetz/anetz.c')
-rw-r--r--src/anetz/anetz.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index 5b4d0b3..8d965fe 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -137,7 +137,7 @@ static void anetz_timeout(struct timer *timer);
static void anetz_go_idle(anetz_t *anetz);
/* Create transceiver instance and link to a list. */
-int anetz_create(const char *sounddev, int samplerate, int kanal, int loopback, double loss_volume)
+int anetz_create(const char *sounddev, int samplerate, const char *write_wave, const char *read_wave, int kanal, int loopback, double loss_volume)
{
anetz_t *anetz;
int rc;
@@ -156,7 +156,7 @@ int anetz_create(const char *sounddev, int samplerate, int kanal, int loopback,
PDEBUG(DANETZ, DEBUG_DEBUG, "Creating 'A-Netz' instance for 'Kanal' = %d (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
- rc = sender_create(&anetz->sender, sounddev, samplerate, kanal, loopback, loss_volume, -1);
+ rc = sender_create(&anetz->sender, sounddev, samplerate, write_wave, read_wave, kanal, loopback, loss_volume, -1);
if (rc < 0) {
PDEBUG(DANETZ, DEBUG_ERROR, "Failed to init 'Sender' processing!\n");
goto error;