aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/anetz.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-04 14:14:02 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:00:45 +0100
commit9ff8c3bb25422e100801f90c17b9c21118920cfd (patch)
tree5715f3cc08893ed86dfc2514c93797d12e24d461 /src/anetz/anetz.c
parentd54d3ac2654844c7b8e4ee67752941c9037d5f42 (diff)
Rework on audio interface
Sound instance is now called audio instance and uses funcation pointers. This gives a clean interface to be exchanged with other technologies, linke SDR.
Diffstat (limited to 'src/anetz/anetz.c')
-rw-r--r--src/anetz/anetz.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index f8c13fd..23ec592 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -82,7 +82,7 @@ double anetz_kanal2freq(int kanal, int unterband)
if (unterband)
freq -= 4.500;
- return freq;
+ return freq * 1e6;
}
/* Convert paging frequency number to to frequency. */
@@ -168,7 +168,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(int kanal, const char *sounddev, int samplerate, double rx_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, int loopback, double loss_volume)
+int anetz_create(int kanal, const char *audiodev, int samplerate, double rx_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, int loopback, double loss_volume)
{
anetz_t *anetz;
int rc;
@@ -187,7 +187,7 @@ int anetz_create(int kanal, const char *sounddev, int samplerate, double rx_gain
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, kanal, sounddev, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, loopback, loss_volume, PILOT_SIGNAL_NONE);
+ rc = sender_create(&anetz->sender, kanal, anetz_kanal2freq(kanal, 0), anetz_kanal2freq(kanal, 1), audiodev, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, loopback, loss_volume, PILOT_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DANETZ, DEBUG_ERROR, "Failed to init 'Sender' processing!\n");
goto error;
@@ -508,7 +508,7 @@ void call_rx_audio(int callref, int16_t *samples, int count)
if (anetz->dsp_mode == DSP_MODE_AUDIO) {
int16_t up[(int)((double)count * anetz->sender.srstate.factor + 0.5) + 10];
count = samplerate_upsample(&anetz->sender.srstate, samples, count, up);
- jitter_save(&anetz->sender.audio, up, count);
+ jitter_save(&anetz->sender.dejitter, up, count);
}
}