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

PCM Library use Leonardo or MegaCore (Atmega128) #6

Open sahingokalp23 opened 5 years ago

sahingokalp23 commented 5 years ago

How can i use this library for Arduino leonardo or MegaCore (atmega128)?? When i try i see this error;

\Arduino\libraries\PCM-master\PCM.c:105:17: error: 'WGM21' undeclared (first use in this function)

TCCR0A |= _BV(WGM21) | _BV(WGM20);

             ^

\Arduino\libraries\PCM-master\PCM.c:105:17: note: each undeclared identifier is reported only once for each function it appears in

\Arduino\libraries\PCM-master\PCM.c:105:30: error: 'WGM20' undeclared (first use in this function)

TCCR0A |= _BV(WGM21) | _BV(WGM20);

                          ^

\Arduino\libraries\PCM-master\PCM.c:106:18: error: 'WGM22' undeclared (first use in this function)

TCCR0B &= ~_BV(WGM22);

              ^

\Arduino\libraries\PCM-master\PCM.c:110:26: error: 'COMA01' undeclared (first use in this function)

TCCR0A = (TCCR0A | _BV(COMA01)) & ~_BV(COMA00);

                      ^

\Arduino\libraries\PCM-master\PCM.c:110:42: error: 'COMA00' undeclared (first use in this function)

TCCR0A = (TCCR0A | _BV(COMA01)) & ~_BV(COMA00);

                                      ^

\Arduino\libraries\PCM-master\PCM.c:111:19: error: 'COM2B1' undeclared (first use in this function)

TCCR0A &= ~(_BV(COM2B1) | _BV(COM2B0));

               ^

\Arduino\libraries\PCM-master\PCM.c:111:33: error: 'COM2B0' undeclared (first use in this function)

TCCR0A &= ~(_BV(COM2B1) | _BV(COM2B0));

Daniel-a-r835 commented 4 years ago

Hello,

Did you ever figure out what to do here?

I can’t for the life of me understand why it’s so hard to play PCM off this chip.

sahingokalp23 commented 4 years ago

Hello ;

yes i solved it. I use Arduino IDE. I program the Atmega 128 with the arduino ide.

From: fadi0albaghdadi notifications@github.com Sent: Wednesday, August 19, 2020 9:46 AM To: damellis/PCM PCM@noreply.github.com Cc: Şahin Gökalp sahin.gokalp@hotmail.com; Author author@noreply.github.com Subject: Re: [damellis/PCM] PCM Library use Leonardo or MegaCore (Atmega128) (#6)

Have you solved the audio playback issue on atmega 128 chip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdamellis%2FPCM%2Fissues%2F6%23issuecomment-675885665&data=02%7C01%7C%7Ce2256704db90433118a808d8440b8f31%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637334163714900389&sdata=ARt6PcgBOnUrt49V50Qm41I12FvdHd2YbqlAIeGrAv8%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIXPC7ESJQ4K6MVHWANT4VTSBNYLFANCNFSM4GWZC7IA&data=02%7C01%7C%7Ce2256704db90433118a808d8440b8f31%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637334163714900389&sdata=KIhRNnUxA%2FfiYnKnEzmtMVJa2qzXQWGB6d%2FfXhnzHCQ%3D&reserved=0.

cbrito commented 4 years ago

@ sahingokalp23 can you share how you resolved the issue? Did you include some other library?