- 886 名前:デフォルトの名無しさん mailto:sage [2008/03/18(火) 17:40:07 ]
- 以下のプログラムから出力される数字を、
wavファイルにするにはどうすればいいでしょうか。 #include <iostream> #include <math.h> using namespace std; const int rate=44100; int p(double q, int f, int t) { const double pi=3.1415; double x; x=sin(2*pi*f/rate*q); cout << int(x*127+128+0.4999); cout << "\n"; if (f<t) p(q,f+1,t); return 0; } int main(void) { p(440.0 , 0, rate); return 0; }
|

|