Add style check matching RP2040 core (#740)
Will let us backport the BackgroundAudio patches to libhelix easier and clean up some ugly formatting we've let develop.
This commit is contained in:
1 parent
62dd23a74a
commit
f9e72dbb21
434 files changed
+94604
-93082
No files matched your search
+23
-24
@@ -1,24 +1,24 @@
|
||||
/*
|
||||
AudioGeneratorTalkie
|
||||
Audio output generator that speaks using the LPC code in old TI speech chips
|
||||
Output is locked at 8khz as that's that the hardcoded LPC coefficients are built around
|
||||
AudioGeneratorTalkie
|
||||
Audio output generator that speaks using the LPC code in old TI speech chips
|
||||
Output is locked at 8khz as that's that the hardcoded LPC coefficients are built around
|
||||
|
||||
Based on the Talkie Arduino library by Peter Knight, https://github.com/going-digital/Talkie
|
||||
|
||||
Copyright (C) 2020 Earle F. Philhower, III
|
||||
Based on the Talkie Arduino library by Peter Knight, https://github.com/going-digital/Talkie
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
Copyright (C) 2020 Earle F. Philhower, III
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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 _AUDIOGENERATORTALKIE_H
|
||||
@@ -26,9 +26,8 @@
|
||||
|
||||
#include "AudioGenerator.h"
|
||||
|
||||
class AudioGeneratorTalkie : public AudioGenerator
|
||||
{
|
||||
public:
|
||||
class AudioGeneratorTalkie : public AudioGenerator {
|
||||
public:
|
||||
AudioGeneratorTalkie();
|
||||
virtual ~AudioGeneratorTalkie() override;
|
||||
virtual bool begin(AudioFileSource *source, AudioOutput *output) override;
|
||||
@@ -36,11 +35,11 @@ class AudioGeneratorTalkie : public AudioGenerator
|
||||
virtual bool stop() override;
|
||||
virtual bool isRunning() override;
|
||||
bool say(const uint8_t *data, size_t len, bool async = false);
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
// The data stream we're playing
|
||||
uint8_t *buff;
|
||||
|
||||
|
||||
// Codeword stream handlers
|
||||
uint8_t *ptrAddr;
|
||||
uint8_t ptrBit;
|
||||
@@ -48,7 +47,7 @@ class AudioGeneratorTalkie : public AudioGenerator
|
||||
bool lastFrame;
|
||||
bool genOneFrame(); // Fill up one frame's worth of data, returns if this is the last frame
|
||||
int16_t genOneSample(); // Generate one sample of a frame
|
||||
|
||||
|
||||
// Utilities
|
||||
uint8_t rev(uint8_t a);
|
||||
uint8_t getBits(uint8_t bits);
|
||||
@@ -58,7 +57,7 @@ class AudioGeneratorTalkie : public AudioGenerator
|
||||
uint16_t synthEnergy;
|
||||
int16_t synthK1, synthK2;
|
||||
int8_t synthK3, synthK4, synthK5, synthK6, synthK7, synthK8, synthK9, synthK10;
|
||||
|
||||
|
||||
int frameLeft;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user