Hello everyone,
I am working on the following code example for the ESP32 that demonstrates headphone detection and sine wave generation. The code uses the AudioKitHAL and SineWaveGenerator libraries:
/**
 * @file headphone.ino
 * @author Phil Schatzmann
 * @brief Headphone Detection Demo
 * @date 2021-12-10
 * 
 * @copyright Copyright (c) 2021
 * 
 */
#include "AudioKitHAL.h"
#include "SineWaveGenerator.h"
AudioKit kit;
SineWaveGenerator wave;
const int BUFFER_SIZE = 1024;
uint8_t buffer[BUFFER_SIZE];
void setup() {
  LOGLEVEL_AUDIOKIT = AudioKitInfo; 
  Serial.begin(115200);
  // open in write mode
  auto cfg = kit.defaultConfig(KitOutput);
  kit.begin(cfg);
  // 1000 Hz
  wave.setFrequency(1000);
  wave.setSampleRate(cfg.sampleRate());
}
void loop() {
  size_t l = wave.read(buffer, BUFFER_SIZE);
  kit.write(buffer, l); // Issue occurs here
}
However, I am encountering a compiler error that states:
'class audiokit::AudioKit' has no member named 'write'
I am not sure if this is due to a change in the AudioKitHAL library, a missing dependency, or if the example code itself has become outdated.
Any guidance or suggestions would be greatly appreciated.
Thank you in advance!