setrate already set click bugfix

This commit is contained in:
ChuckMash 2023-12-16 00:55:17 -08:00 committed by GitHub
parent 0abcf71012
commit f72d75e267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -129,6 +129,11 @@ bool AudioOutputI2S::SetPinout(int bclk, int wclk, int dout, int mclk)
bool AudioOutputI2S::SetRate(int hz)
{
// TODO - have a list of allowable rates from constructor, check them
if(this->hertz == hz){ // hz already set to this
return true;
}
this->hertz = hz;
if (i2sOn)
{