diff --git a/TMRpcm.cpp b/TMRpcm.cpp index b638e65..b115d97 100644 --- a/TMRpcm.cpp +++ b/TMRpcm.cpp @@ -1742,6 +1742,7 @@ void TMRpcm::startRecording(const char *fileName, unsigned int SAMPLE_RATE, byte adcsra = ADCSRA; adcsrb = ADCSRB; + admux = ADMUX; recording = passThrough + 1; setPin(); if(recording < 3){ @@ -1848,6 +1849,7 @@ void TMRpcm::stopRecording(const char *fileName){ *TIMSK[tt] &= ~(_BV(OCIE1B) | _BV(OCIE1A)); ADCSRA = adcsra; ADCSRB = adcsrb; + ADMUX = admux; if(recording == 1 || recording == 2){ recording = 0; diff --git a/TMRpcm.h b/TMRpcm.h index d420749..921b06d 100644 --- a/TMRpcm.h +++ b/TMRpcm.h @@ -119,6 +119,7 @@ class TMRpcm #if defined (ENABLE_RECORDING) uint8_t adcsra; uint8_t adcsrb; + uint8_t admux; #endif };