aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/anetz.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-11-13 05:51:09 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2016-11-13 06:00:24 +0100
commit52b1ac65f4b502178e6f4f9a8af8fd6ac0ee7ec8 (patch)
tree729a0f02b5b8866c105cbf78474a339f49672435 /src/anetz/anetz.c
parent3cd102c638f7073203529ce7cb979a5d4628685a (diff)
A-Netz: Keep phase for each paging tone when played in sequence
If paging tones are played in sequence, only one tone out of four tones is played at once. The phase of all tones are calculated as if each tone would have been sent permanently.
Diffstat (limited to 'src/anetz/anetz.c')
-rw-r--r--src/anetz/anetz.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index eae8beb..6f04c63 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(int kanal, const char *sounddev, int samplerate, int cross_channels, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_wave, const char *read_wave, int loopback, double loss_volume)
+int anetz_create(int kanal, const char *sounddev, int samplerate, int cross_channels, double rx_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_wave, const char *read_wave, int loopback, double loss_volume)
{
anetz_t *anetz;
int rc;
@@ -163,7 +163,7 @@ int anetz_create(int kanal, const char *sounddev, int samplerate, int cross_chan
}
/* init audio processing */
- rc = dsp_init_sender(anetz);
+ rc = dsp_init_sender(anetz, page_sequence);
if (rc < 0) {
PDEBUG(DANETZ, DEBUG_ERROR, "Failed to init signal processing!\n");
goto error;
@@ -372,6 +372,8 @@ inval:
}
PDEBUG(DANETZ, DEBUG_INFO, "Call to mobile station, paging with tones: %.1f %.1f %.1f %.1f\n", freq[0], freq[1], freq[2], freq[3]);
+ if (anetz->page_sequence)
+ PDEBUG(DANETZ, DEBUG_NOTICE, "Sending paging tones in sequence. 'click' sounds may appear, because the phase of each individual tone might be different.\n");
/* 4. trying to page mobile station */
anetz->callref = callref;