aboutsummaryrefslogtreecommitdiff
path: root/quantum/audio
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-12-26 15:53:12 +1100
committerGitHub <noreply@github.com>2020-12-26 15:53:12 +1100
commit48f4768d33313e6a6ed48c31f95eb44feda10a51 (patch)
tree49944f8e0399fc661b9adbf7d8c0962995634579 /quantum/audio
parent53eb7f0774881e8a9f6186a51e15135edc6f8575 (diff)
downloadqmk_firmware-48f4768d33313e6a6ed48c31f95eb44feda10a51.tar.gz
qmk_firmware-48f4768d33313e6a6ed48c31f95eb44feda10a51.zip
Change include guards in quantum/ to pragma once (#11239)
Diffstat (limited to 'quantum/audio')
-rw-r--r--quantum/audio/audio.h6
-rw-r--r--quantum/audio/luts.h11
-rw-r--r--quantum/audio/muse.h5
-rw-r--r--quantum/audio/musical_notes.h5
-rw-r--r--quantum/audio/voices.h12
5 files changed, 13 insertions, 26 deletions
diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h
index 805cb4f7a..bc00cd19e 100644
--- a/quantum/audio/audio.h
+++ b/quantum/audio/audio.h
@@ -13,8 +13,8 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#ifndef AUDIO_H 16
17#define AUDIO_H 17#pragma once
18 18
19#include <stdint.h> 19#include <stdint.h>
20#include <stdbool.h> 20#include <stdbool.h>
@@ -103,5 +103,3 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat);
103#define PLAY_LOOP(note_array) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), true) 103#define PLAY_LOOP(note_array) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), true)
104 104
105bool is_playing_notes(void); 105bool is_playing_notes(void);
106
107#endif
diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h
index 6fdd3b463..74980b292 100644
--- a/quantum/audio/luts.h
+++ b/quantum/audio/luts.h
@@ -14,6 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#pragma once
18
17#if defined(__AVR__) 19#if defined(__AVR__)
18# include <avr/io.h> 20# include <avr/io.h>
19# include <avr/interrupt.h> 21# include <avr/interrupt.h>
@@ -23,14 +25,9 @@
23# include <hal.h> 25# include <hal.h>
24#endif 26#endif
25 27
26#ifndef LUTS_H 28#define VIBRATO_LUT_LENGTH 20
27# define LUTS_H
28
29# define VIBRATO_LUT_LENGTH 20
30 29
31# define FREQUENCY_LUT_LENGTH 349 30#define FREQUENCY_LUT_LENGTH 349
32 31
33extern const float vibrato_lut[VIBRATO_LUT_LENGTH]; 32extern const float vibrato_lut[VIBRATO_LUT_LENGTH];
34extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH]; 33extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH];
35
36#endif /* LUTS_H */
diff --git a/quantum/audio/muse.h b/quantum/audio/muse.h
index 6f382a7fe..ad2f96e43 100644
--- a/quantum/audio/muse.h
+++ b/quantum/audio/muse.h
@@ -1,9 +1,6 @@
1#ifndef MUSE_H 1#pragma once
2#define MUSE_H
3 2
4#include "quantum.h" 3#include "quantum.h"
5#include "process_audio.h" 4#include "process_audio.h"
6 5
7uint8_t muse_clock_pulse(void); 6uint8_t muse_clock_pulse(void);
8
9#endif
diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h
index 9742e19c4..8ac6aafd3 100644
--- a/quantum/audio/musical_notes.h
+++ b/quantum/audio/musical_notes.h
@@ -14,8 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#ifndef MUSICAL_NOTES_H 17#pragma once
18#define MUSICAL_NOTES_H
19 18
20// Tempo Placeholder 19// Tempo Placeholder
21#define TEMPO_DEFAULT 100 20#define TEMPO_DEFAULT 100
@@ -229,5 +228,3 @@
229#define NOTE_GF8 NOTE_FS8 228#define NOTE_GF8 NOTE_FS8
230#define NOTE_AF8 NOTE_GS8 229#define NOTE_AF8 NOTE_GS8
231#define NOTE_BF8 NOTE_AS8 230#define NOTE_BF8 NOTE_AS8
232
233#endif
diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h
index 0c45b0720..abafa2b40 100644
--- a/quantum/audio/voices.h
+++ b/quantum/audio/voices.h
@@ -13,6 +13,9 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16
17#pragma once
18
16#include <stdint.h> 19#include <stdint.h>
17#include <stdbool.h> 20#include <stdbool.h>
18#if defined(__AVR__) 21#if defined(__AVR__)
@@ -21,14 +24,11 @@
21#include "wait.h" 24#include "wait.h"
22#include "luts.h" 25#include "luts.h"
23 26
24#ifndef VOICES_H
25# define VOICES_H
26
27float voice_envelope(float frequency); 27float voice_envelope(float frequency);
28 28
29typedef enum { 29typedef enum {
30 default_voice, 30 default_voice,
31# ifdef AUDIO_VOICES 31#ifdef AUDIO_VOICES
32 something, 32 something,
33 drums, 33 drums,
34 butts_fader, 34 butts_fader,
@@ -41,12 +41,10 @@ typedef enum {
41// duty_fourth_down, 41// duty_fourth_down,
42// duty_third_down, 42// duty_third_down,
43// duty_fifth_third_down, 43// duty_fifth_third_down,
44# endif 44#endif
45 number_of_voices // important that this is last 45 number_of_voices // important that this is last
46} voice_type; 46} voice_type;
47 47
48void set_voice(voice_type v); 48void set_voice(voice_type v);
49void voice_iterate(void); 49void voice_iterate(void);
50void voice_deiterate(void); 50void voice_deiterate(void);
51
52#endif