Playing sound on Arduino Leonardo

Hi, I'v been trying to playback audio through a speaker on the Leonardo using a PCM library I found on http://highlowtech.org/?p=1963

When I load the example and click to compile it gives me errors, as I understand the problem is caused because I'm using a leonardo as opposed to Uno. Please help me make it work on my Arduino Leonardo. I had the same problem when trying to use a similar library. Here is the error code

C:\Users\Anton\Documents\Arduino\libraries\PCM\PCM.c: In function '__vector_17':
C:\Users\userDocuments\Arduino\libraries\PCM\PCM.c:81: error: 'OCR2A' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:81: error: (Each undeclared identifier is reported only once
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:81: error: for each function it appears in.)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c: In function 'startPlayback':
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:102: error: 'ASSR' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:102: error: 'EXCLK' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:102: error: 'AS2' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:105: error: 'TCCR2A' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:105: error: 'WGM21' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:105: error: 'WGM20' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:106: error: 'TCCR2B' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:106: error: 'WGM22' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:110: error: 'COM2A1' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:110: error: 'COM2A0' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:111: error: 'COM2B1' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:111: error: 'COM2B0' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:117: error: 'OCR2A' undeclared (first use in this function)
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c: In function 'stopPlayback':
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:154: error: 'TCCR2B' undeclared (first use in this function)

Looks like the ATmega32u4 doesn't have a Timer2, just 0, 1, 3, and 4.

Timer0 is 8-bit
Timer1 and Timer3 are 16-bit timers.
Timer4 is a special 10-bit timer

None of them is a good match for the UNO's Timer2 8-bit timer (I assume Timer0 is till used for Arduino system timing). You can probably use Timer3. Start by changing all references to Timer2 registers so they got to Timer3 instead. That leaves references to ASSR, EXCLK, AS2. You will have to study the ATmeag328P and ATmega32u4 datasheets to translate those references.