Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
rename AudioOutput/Inkput to KitOutput/Inpuf
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Oct 24, 2023
1 parent 18a41d6 commit b5652b3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ uint8_t buffer[BUFFER_SIZE];
void setup() {
Serial.begin(115200);
// open in write mode
auto cfg = kit.defaultConfig(AudioOutput);
auto cfg = kit.defaultConfig(KitOutput);
cfg.sample_rate = AUDIO_HAL_22K_SAMPLES;
kit.begin(cfg);

Expand Down
2 changes: 1 addition & 1 deletion examples/input/input.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void printBuffer(int len){
void setup() {
Serial.begin(115200);
// open in read mode
auto cfg = kit.defaultConfig(AudioInput);
auto cfg = kit.defaultConfig(KitInput);
cfg.adc_input = AUDIO_HAL_ADC_INPUT_LINE2; // microphone?
cfg.sample_rate = AUDIO_HAL_16K_SAMPLES;
kit.begin(cfg);
Expand Down
2 changes: 1 addition & 1 deletion examples/output/output.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void setup() {
LOGLEVEL_AUDIOKIT = AudioKitInfo;
Serial.begin(115200);
// open in write mode
auto cfg = kit.defaultConfig(AudioOutput);
auto cfg = kit.defaultConfig(KitOutput);
kit.begin(cfg);

// 1000 hz
Expand Down
2 changes: 1 addition & 1 deletion examples/output_without_i2s/output_without_i2s.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void setup() {
LOGLEVEL_AUDIOKIT = AudioKitInfo;

// Setup Codec chip only w/o I2S
auto cfg = kit.defaultConfig(AudioOutput);
auto cfg = kit.defaultConfig(KitOutput);
cfg.i2s_active = false;
cfg.sample_rate = AUDIO_HAL_08K_SAMPLES;
kit.begin(cfg);
Expand Down
8 changes: 4 additions & 4 deletions src/AudioKitHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ struct AudioKitConfig {
* @brief Do we read or write audio data - or both
*
*/
enum AudioKitInOut { AudioOutput, AudioInput, AudioInputOutput };
enum AudioKitInOut { KitOutput, KitInput, KitInputOutput };

/**
* @brief AudioKit API using the audio_hal
Expand All @@ -203,14 +203,14 @@ class AudioKit {
}

/// Provides the default configuration for input or output
AudioKitConfig defaultConfig(AudioKitInOut inout = AudioInputOutput)
AudioKitConfig defaultConfig(AudioKitInOut inout = KitInputOutput)
{
AudioKitConfig result;
switch (inout) {
case AudioOutput:
case KitOutput:
result.codec_mode = AUDIO_HAL_CODEC_MODE_DECODE; // dac
break;
case AudioInput:
case KitInput:
result.codec_mode = AUDIO_HAL_CODEC_MODE_ENCODE; // adc
break;
default:
Expand Down

0 comments on commit b5652b3

Please sign in to comment.