diff options
Diffstat (limited to 'src/common/includes')
-rw-r--r-- | src/common/includes/Audio/audio_in.h | 3 | ||||
-rw-r--r-- | src/common/includes/Audio/tone.h | 10 | ||||
-rw-r--r-- | src/common/includes/Core/fsm.h | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/common/includes/Audio/audio_in.h b/src/common/includes/Audio/audio_in.h index a543a69..40482d9 100644 --- a/src/common/includes/Audio/audio_in.h +++ b/src/common/includes/Audio/audio_in.h @@ -32,6 +32,9 @@ void audio_in_initialize(void); +/* Enable or disable the audio input */ +void audio_in_enable(int enable); + // After calling this function, *buffer will point to new audio data. // Returns the number of times filling the internal buffer failed. int32_t audio_in_get_buffer(int16_t **buffer /*of length AUDIO_IN_BUF_LEN*/ ); diff --git a/src/common/includes/Audio/tone.h b/src/common/includes/Audio/tone.h index b8a7f72..a4692df 100644 --- a/src/common/includes/Audio/tone.h +++ b/src/common/includes/Audio/tone.h @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2018 Matthias P. Braendli, Maximilien Cuony + * Copyright (c) 2019 Matthias P. Braendli, Maximilien Cuony * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -42,10 +42,14 @@ struct tone_detector { void tone_init(void); +void tone_detector_enable(int enable); + /* Return 1 when 1750 detected, 0 otherwise */ int tone_1750_status(void); -/* Update 1750 tone detection status */ -void tone_detect_1750(const int16_t *samples, int len); +int tone_fax_status(void); + +/* Update all tone detection status */ +void tone_detect_push_samples(const int16_t *samples, int len); #endif diff --git a/src/common/includes/Core/fsm.h b/src/common/includes/Core/fsm.h index f8a800c..91bb231 100644 --- a/src/common/includes/Core/fsm.h +++ b/src/common/includes/Core/fsm.h @@ -105,6 +105,8 @@ struct fsm_output_signals_t { int cw_psk31_trigger; // Set to true to trigger a CW or PSK31 transmission. // PSK31 is sent if cw_dit_duration is 0 + /* Tone detector */ + int require_tone_detector; // Enables audio input and detector for DTMF and 1750 }; // Initialise local structures |