Forum: Sonstige Fragen zu Delphi
by igel457,
7. Sep 2006
Ich frage mich überhaupt, für was man so ein Format braucht. Wer schreibt schon "per Hand" Sounds?
Was ich oben noch vergessen habe, ist dass du dir Duration noch ausrechnen musst. Und zwar mit SampleRate/SampleCount.
Forum: Sonstige Fragen zu Delphi
by igel457,
7. Sep 2006
Das musst du einfach in eine WAV Datei schreiben.
procedure MakeSound(Duration{mSec}: Integer);
{writes tone to memory and plays it}
var
WaveFormatEx: TWaveFormatEx;
MS: TMemoryStream;
i, TempInt, DataCount, RiffCount: integer;
SoundValue: byte;
w: double; // omega ( 2 * pi * frequency)