Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Sound/Sound.cpp
- Revision:
- 31:cfdb014ff086
- Parent:
- 30:08cc4ec58d07
- Child:
- 33:e7635c8a58a8
--- a/Sound/Sound.cpp Tue May 26 10:17:47 2020 +0000 +++ b/Sound/Sound.cpp Tue May 26 14:21:36 2020 +0000 @@ -17,25 +17,25 @@ uint16_t Sound::sound_main(bool initial, int waveform, int frequency) { - if (initial==true) { + if (initial==true) { //initiialises i=0; return(i); } - i=wavetable_itt(i,frequency); + i=wavetable_itt(i,frequency);//itterates i value - if (waveform==1) { + if (waveform==1) { //sin values #ifdef SLOW_TIME printf("SIN_wavtable[%u]\n",i); #endif return (sin_wavtable[i]); } - if (waveform==2) { + if (waveform==2) { //tri #ifdef SLOW_TIME printf("TRI_wavtable[%u]\n",i); #endif return (tri_wavtable[i]); } - if (waveform==3) { + if (waveform==3) { //pulse #ifdef SLOW_TIME printf("SQR_wavtable[%u]\n",i); #endif