Speaker connected to Arduino board won't play sound (PCM libary)

Hello! I’m using the PCM-library for arduino, which I downloaded via: https://drive.google.com/file/d/1LSb-nZcecs1VISQDPTub7XGFwcTmnl4z/view

I opened then zipfile in my download folder and then opened the zipfile including the library via APL. I then opened up the example sketch and tried running it. Before this has been working without any problem what so ever. The sketch:

#include <PCM.h>
const unsigned char sample[] PROGMEM = { the encoded audio file };
void setup(){
startPlayback(sample, sizeof(sample));
}
void loop(){}

When I then upload the code it works. I have connected the speakers positive pin to the 5V, and the negative to the collector of the transistor. The 11 pin on the arduino is connected to the base of the transistor and the emitter to the arduino ground pin. The transistor I’m using is a TIP 120 transistor, the arduino is a mega and the speaker is a WBN 16 ohm 2 W speaker. I have changed these components including the wires and tested, restarted my computer and have been searching for the problem a while now. Doea anyone know how to help?

It is doing exactly what it was designed to do. You need to study the data sheet, it is not a 5V device. Try using an avalanche protected logic level MOSFET, your problems will go away. The source is ground, the drain is the speaker, the gate is the arduino pin.
Good Luck & Have Fun!
Gil

The 11 pin on the arduino is connected to the base of the transistor and the emitter to the arduino ground pin.

So no base resistor then. You might have already blown something.