TMRpcm icon indicating copy to clipboard operation
TMRpcm copied to clipboard

Can not use startRecording and play() in same compile

Open jlsilicon opened this issue 1 year ago • 2 comments

If : pcmConfig.h needs commented : #define ENABLE_RECORDING is enabled.

then TMRpcm.play("file") does not work.

Serial.println(audio.isPlaying()); -- always returns 0

Using Arduino Nano atmega328.

Could this be an Interrupt conflict ?

jlsilicon avatar Feb 01 '25 04:02 jlsilicon

I'm quite certain others would have reported this issue previously if there was an issue with the library.

Have you changed anything else while connecting things for recording?

Nothing in the code has changed recently, so I would assume you must be doing something that is preventing it from working.

TMRh20 avatar Feb 01 '25 09:02 TMRh20

Ok, I got it. 2 problems :

1: When you record you use( "filename" ) : audio.startRecording("sound");

but when you play you use ( "filename.WAV" ) : audio.play("sound.wav");

2: I do not have an Amp , so sound is only a light whisper.

jlsilicon avatar Feb 02 '25 16:02 jlsilicon