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.
This commit is contained in:
Andreas Eversberg
2016-11-13 05:51:09 +01:00
parent 3cd102c638
commit 52b1ac65f4
5 changed files with 32 additions and 22 deletions

View File

@@ -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;