summaryrefslogtreecommitdiff
path: root/quantum/audio
diff options
context:
space:
mode:
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 805cb4f7ab..bc00cd19e6 100644
--- a/quantum/audio/audio.h
+++ b/quantum/audio/audio.h
@@ -13,8 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AUDIO_H
-#define AUDIO_H
+
+#pragma once
#include <stdint.h>
#include <stdbool.h>
@@ -103,5 +103,3 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat);
#define PLAY_LOOP(note_array) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), true)
bool is_playing_notes(void);
-
-#endif
diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h
index 6fdd3b4635..74980b292e 100644
--- a/quantum/audio/luts.h
+++ b/quantum/audio/luts.h
@@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
#if defined(__AVR__)
# include <avr/io.h>
# include <avr/interrupt.h>
@@ -23,14 +25,9 @@
# include <hal.h>
#endif
-#ifndef LUTS_H
-# define LUTS_H
-
-# define VIBRATO_LUT_LENGTH 20
+#define VIBRATO_LUT_LENGTH 20
-# define FREQUENCY_LUT_LENGTH 349
+#define FREQUENCY_LUT_LENGTH 349
extern const float vibrato_lut[VIBRATO_LUT_LENGTH];
extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH];
-
-#endif /* LUTS_H */
diff --git a/quantum/audio/muse.h b/quantum/audio/muse.h
index 6f382a7fee..ad2f96e43a 100644
--- a/quantum/audio/muse.h
+++ b/quantum/audio/muse.h
@@ -1,9 +1,6 @@
-#ifndef MUSE_H
-#define MUSE_H
+#pragma once
#include "quantum.h"
#include "process_audio.h"
uint8_t muse_clock_pulse(void);
-
-#endif
diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h
index 2cc3b1f4f5..66aafd27c7 100644
--- a/quantum/audio/musical_notes.h
+++ b/quantum/audio/musical_notes.h
@@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MUSICAL_NOTES_H
-#define MUSICAL_NOTES_H
+#pragma once
// Tempo Placeholder
#ifndef TEMPO_DEFAULT
@@ -233,5 +232,3 @@
#define NOTE_GF8 NOTE_FS8
#define NOTE_AF8 NOTE_GS8
#define NOTE_BF8 NOTE_AS8
-
-#endif
diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h
index 0c45b0720e..abafa2b404 100644
--- a/quantum/audio/voices.h
+++ b/quantum/audio/voices.h
@@ -13,6 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#pragma once
+
#include <stdint.h>
#include <stdbool.h>
#if defined(__AVR__)
@@ -21,14 +24,11 @@
#include "wait.h"
#include "luts.h"
-#ifndef VOICES_H
-# define VOICES_H
-
float voice_envelope(float frequency);
typedef enum {
default_voice,
-# ifdef AUDIO_VOICES
+#ifdef AUDIO_VOICES
something,
drums,
butts_fader,
@@ -41,12 +41,10 @@ typedef enum {
// duty_fourth_down,
// duty_third_down,
// duty_fifth_third_down,
-# endif
+#endif
number_of_voices // important that this is last
} voice_type;
void set_voice(voice_type v);
void voice_iterate(void);
void voice_deiterate(void);
-
-#endif