Autor Beitrag
smepal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

Win XP, Linux Mandbrake,SUSE 10.1, SUSE 9 PE, DEBIAN, Win 2000 Pro, Win XP Pro
Delphi
BeitragVerfasst: Fr 04.08.06 11:21 
Ich habe diesen Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TSettings.EchoClick(Sender: TObject);
begin
if echo.Checked then
begin
BASS_ChannelSetFX(p, BASS_FX_ECHO, 0);
end
else
begin
bass_channelstop(p);
BASS_CHANNELREMOVEFX(p, BASS_FX_ECHO);
bass_channelplay(p, false);
end;
end;

so das Hinzufügen des Echos klappt aber ich bekomme es nicht wieder weg!
smepal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

Win XP, Linux Mandbrake,SUSE 10.1, SUSE 9 PE, DEBIAN, Win 2000 Pro, Win XP Pro
Delphi
BeitragVerfasst: So 06.08.06 19:22 
Hat keiner eine Idee wodran es liegen könnte?
smepal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

Win XP, Linux Mandbrake,SUSE 10.1, SUSE 9 PE, DEBIAN, Win 2000 Pro, Win XP Pro
Delphi
BeitragVerfasst: Di 08.08.06 09:46 
Also ich weiß jetzt wo es dran liegt:

Beim hinzufügen muss der Effekt einem handle zugeordnet werden und das muss dann auch wieder entfernt werden.

Das sieht dann so aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TSettings.EchoClick(Sender: TObject);
var echohandle: HFX;
begin
if echo.Checked then
echohandle := BASS_ChannelSetFX(p, BASS_FX_ECHO, 1)
else
BASS_ChannelRemoveFX(p, EchoHandle);
end;