damellis / PCM

Arduino library for simple playback of audio samples using pulse-code modulation.
http://hlt.media.mit.edu/?p=1963
81 stars 25 forks source link

Using PCM.h and AnalogWrite(pin, value) causes PWM to stop working #9

Open UnforeseenOcean opened 3 years ago

UnforeseenOcean commented 3 years ago

Let's say we have an LED that is controlled on pin 10 of Arduino Nano, and the speaker is connected to pin 11 as the library states. When the startPlayback() fires, it plays the sound without issue, but then the LED stops turning on. If anything is writing to the PWM-capable pin, the sound playback immediately stops.

This potentially is due to the fact that the PWM timer is disabled when the playback stops, from my cursory overview.