Skip to content

Commit

Permalink
setBufsize() deleted #947
Browse files Browse the repository at this point in the history
  • Loading branch information
schreibfaul1 committed Jan 15, 2025
1 parent 09a5257 commit 26d0610
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
14 changes: 0 additions & 14 deletions src/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ AudioBuffer::~AudioBuffer() {
m_buffer = NULL;
}

void AudioBuffer::setBufsize(int ram, int psram) {
if(ram > -1) // -1 == default / no change
m_buffSizeRAM = ram;
if(psram > -1) m_buffSizePSRAM = psram;
}

int32_t AudioBuffer::getBufsize() { return m_buffSize; }

size_t AudioBuffer::init() {
Expand Down Expand Up @@ -236,14 +230,6 @@ Audio::~Audio() {
}
// clang-format on
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
void Audio::setBufsize(int rambuf_sz, int psrambuf_sz) {
if(InBuff.isInitialized()) {
log_e("Audio::setBufsize must not be called after audio is initialized");
return;
}
InBuff.setBufsize(rambuf_sz, psrambuf_sz);
};

void Audio::initInBuff() {
if(!InBuff.isInitialized()) {
size_t size = InBuff.init();
Expand Down
2 changes: 0 additions & 2 deletions src/Audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class AudioBuffer {
~AudioBuffer(); // frees the buffer
size_t init(); // set default values
bool isInitialized() { return m_f_init; };
void setBufsize(int ram, int psram);
int32_t getBufsize();
void changeMaxBlockSize(uint16_t mbs); // is default 1600 for mp3 and aac, set 16384 for FLAC
uint16_t getMaxBlockSize(); // returns maxBlockSize
Expand Down Expand Up @@ -144,7 +143,6 @@ class Audio : private AudioBuffer{
public:
Audio(uint8_t i2sPort = I2S_NUM_0);
~Audio();
void setBufsize(int rambuf_sz, int psrambuf_sz);
bool openai_speech(const String& api_key, const String& model, const String& input, const String& voice, const String& response_format, const String& speed);
bool connecttohost(const char* host, const char* user = "", const char* pwd = "");
bool connecttospeech(const char* speech, const char* lang);
Expand Down

0 comments on commit 26d0610

Please sign in to comment.