Skip to content

Commit

Permalink
start in-place documentation of dac settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Jun 1, 2019
1 parent 3e1826a commit 3e6478b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions quantum/audio/audio_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,32 @@ bool glissando = true;
#endif
float startup_song[][2] = STARTUP_SONG;

/** Size of the dac_buffer arrays. All must be the same size. */
#define DAC_BUFFER_SIZE 256U

/** Highest value allowed by our 12bit DAC */
#ifndef DAC_SAMPLE_MAX
#define DAC_SAMPLE_MAX 4095U
#endif

/** Effective bitrate of the DAC. 44.1khz is the standard for most audio - any
* lower will sacrifice perceptible audio quality. Any higher will limit the
* number of simultaneous voices.
*/
#ifndef DAC_SAMPLE_RATE
#define DAC_SAMPLE_RATE 44100U
#endif

/** The number of voices (in polyphony) that are supported. Certain voices will
* glitch out at different values - most (the look-ups) survive 5.
*/
#ifndef DAC_VOICES_MAX
#define DAC_VOICES_MAX 5
#endif

/** The default value of the DAC when not playing anything. Certain hardware
* setups may require a high (DAC_SAMPLE_MAX) or low (0) value here.
*/
#ifndef DAC_OFF_VALUE
#define DAC_OFF_VALUE DAC_SAMPLE_MAX / 2
#endif
Expand Down

0 comments on commit 3e6478b

Please sign in to comment.