PCM library issue

Hi, I uploaded the Example Playback sketch for this library. http://highlowtech.org/?p=1963

There is a square wave output on Pin 11, at approximately 50kHz. When I connect a small amplifier and speaker to the pin via a blocking capacitor, there is some variation in a high pitch whine noise, at about the same repeating rate of the expected sample repeat rate. I put the same playback code into the loop() as well as setup(), to be able to continuously monitor the output without having to reset. I tried a simple filter of 470 ohm in series with output and 0.1 microfarad after that to ground. Square wave is showing on scope as a much lower amplitude triangle wave. So the filter is working. Still no audio output to the amplifier. Amplifier is working fine with another source.

An Arduino Promini is using the same Atmega328 as an Uno. There shouldn't be an issue?

How about a schematic? How are you powering your amp/speaker? The arduino can't deliver much power. If you are powering them with something else, is the ground connected to the arduino?

Is your pro mini the 3.3V or 5V version?

5v 16 MHz pro mini. Schematic would only show pin 11 output as connected to scope input, or via 1uF to amp line level input. Ground connected to both pro mini and scope ground, or amp ground. Amp is using the same 5v supply as pro mini.

There is a Youtub link of this same project working herehttps://youtu.be/F28Znry0qcw

Line level audio input should at max be 2 volts.. Your pulsing a 5volt signal to it?

Ok, thanks if anyone has a helpful suggestion, related to the use of the PCM library. If anyone has tried this example, like to know if it worked?

I'm not sure the 2 links given make sense in their descriptions. 8 kHz sampling rate is fair enough, but not the mention of 16 bit samples. The example sketch has 8 bit integer values. After using a suggested converter program in the original article? Not sure why such a complicated route. The 2nd link to a youtube video is not the original project author.

I'll now check the code in the PCM library. I would expect to find it uses 8 bit unsigned integers.

The github PCM version of the PCM Library and example sketch look to be identical.

Does anyone have an idea as to what might be the problem with the software?

The amp is a common 5v power amp module, for MP3 music or computer add-on speaker projects. It has a potentiometer on the input as a volume control.

The solution is really obvious, well if one takes a close look at what happens after the call to the PCM library function to start playback. Another call before all the pgm array samples have been used, starts from the beginning. There is no wait state while sequencing through all values and the end size of the array is reached. Interesting if you don't mind truncating the sound clip for a continuous loop effect. Otherwise a delay is needed before the next start playback is called, in the example sketch this is about 2.5 seconds.