diff options
author | Florian Jung <flo@thinkpad.(none)> | 2011-01-16 18:18:39 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-16 18:30:53 +0100 |
commit | 12f20783b7ec8804825282fd04d9333ec83e31eb (patch) | |
tree | aae39218ace9c7c12c14cf1246cd2485bf1323f1 /synth/util.cpp | |
parent | 527e7400f227703b9f0932b685f2bf7f2c2c005b (diff) |
Added waveforms and noise, changed foo++ into ++foo
List of waveforms:
0=sin
1=abssin
2=half_sin
3=pulse-sin
4=square
5=sawtooth
6=pyramid
7=white noise
Diffstat (limited to 'synth/util.cpp')
-rw-r--r-- | synth/util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synth/util.cpp b/synth/util.cpp index c54f2d5..fb32d4d 100644 --- a/synth/util.cpp +++ b/synth/util.cpp @@ -20,7 +20,7 @@ string IntToStrHex(int i) bool isnum(string s) { - for (size_t i=0;i<s.length();i++) + for (size_t i=0;i<s.length();++i) if (!isdigit(s[i])) return false; @@ -37,7 +37,7 @@ string remove_all_spaces(string s) { string result; - for (size_t i=0; i<s.length(); i++) + for (size_t i=0; i<s.length(); ++i) if ((s[i]!=' ') && (s[i]!='\t')) result+=s[i]; @@ -49,14 +49,14 @@ string trim_spaces(string s) string result; int i; - for (i=0;i<s.length();i++) + for (i=0;i<s.length();++i) if ((s[i]!=' ') && (s[i]!='\t')) break; if (i!=s.length()) { result=s.substr(i); - for (i=result.length()-1;i>=0;i--) + for (i=result.length()-1;i>=0;--i) if ((result[i]!=' ') && (result[i]!='\t')) break; |