From 76f58c6eb4991d3f8c9648d0dc8a57e496f01d5a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 17 Jun 2018 18:56:15 +0200 Subject: Add tone-test-sim --- src/common/includes/Audio/tone.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/common/includes') diff --git a/src/common/includes/Audio/tone.h b/src/common/includes/Audio/tone.h index 1398ca5..0e80228 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 Maximilien Cuony + * Copyright (c) 2018 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 @@ -37,16 +37,11 @@ struct tone_detector { float Q1; float Q2; float threshold; -}; - -static struct tone_detector detector_1750; - -void init_tones(void); -void init_tone(struct tone_detector* detector, int freq, int threshold); -void detect_tones(int16_t * buffer); - -int TONE_1750_DETECTED = 0; + int num_samples_analysed; +}; +void tone_init(int threshold); +int tone_detect_1750(int16_t sample); #endif -- cgit v1.2.3