Registriert seit: 14. Sep 2002
Ort: Steinbach, MB, Canada
301 Beiträge
Delphi XE2 Architect
|
Re: mp3 zu wav konvertieren
30. Okt 2008, 09:56
Delphi-Quellcode:
var PercentDone : Integer;
Procedure Convert();
var Channel : DWORD;
buf : array [0..10000] of BYTE;
begin
Channel := BASS_StreamCreateFile(false, Pchar(File.mp3), 0, 0, BASS_STREAM_DECODE);
BASS_Encode_Start(channel, "output.wav", BASS_ENCODE_PCM, NULL, 0);
while (BASS_ChannelIsActive(Channel ) > 0) do
begin
BASS_ChannelGetData(Channel, @buf, 10000);
Application.ProcessMessages;
PercentDone := Trunc(100 * (BASS_ChannelGetPosition(Channel , BASS_POS_BYTE) / BASS_ChannelGetLength(Channel , BASS_POS_BYTE)));
ProgressBar.Position := PercentDone;
end;
end;
|
|
Zitat
|