Okayyyy.... alllso einmal muss ich doch noch was fragen!
Und zwar:
Delphi-Quellcode:
Procedure TForm1.LoadTheWave(FileName: String; out Value: TSmallIntArray;Start: Integer = 0);
begin
with TFilestream.Create(Filename, fmOpenRead) do
try
Position := Size;
setlength(Value, Size-Position);
ReadBuffer(Value,length(Value));
finally
Free;
end;
end;
Procedure TForm1.SaveTheWave(Filename: string; Value: TSmallIntArray);
begin
with TFileStream.Create(Filename, fmOpenWrite) do
try
WriteBuffer(Value,length(Value)*sizeof(SmallInt));
finally
Free;
end;
end;
Procedure TForm1.ProcessWave(FileName: String);
var
Wavbuffer: TSmallIntArray;
Header: TWaveHeader;
i: Integer;
begin
LoadTheWave(Outputfile.Text, Wavbuffer, sizeof(Header)+1); //laden des waves
for i := 0 to high(Wavbuffer) do // testweise stille einfügen
begin
Wavbuffer[i] := 0;
end;
SaveTheWave(Outputfile.Text, Wavbuffer);
end;
Siehe "ProcessWave(FileName: String);"
Ich lade also das wav-file, modifiziere es und speichere es wieder ...
allerdings hat sich rein gar nichts im WAV file verändert?