aboutsummaryrefslogtreecommitdiffstats
path: root/medley_new/src/media/UAudioPlayback_Bass.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-17 11:35:26 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-17 11:35:26 +0000
commit6857c4c06206f80aee1855951b916a6526c87fc7 (patch)
tree24dc6438ab5c1c470a16ff85c4fa60aa70275865 /medley_new/src/media/UAudioPlayback_Bass.pas
parentb75e7399a7a3b7672d85f52013f916d06dd63651 (diff)
downloadusdx-6857c4c06206f80aee1855951b916a6526c87fc7.tar.gz
usdx-6857c4c06206f80aee1855951b916a6526c87fc7.tar.xz
usdx-6857c4c06206f80aee1855951b916a6526c87fc7.zip
added general fading (for fade-out)
it must be tested on MacOS and Linux. a more general fading function would be better (with "fade to pause" and "fade to end"). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2672 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--medley_new/src/media/UAudioPlayback_Bass.pas7
1 files changed, 7 insertions, 0 deletions
diff --git a/medley_new/src/media/UAudioPlayback_Bass.pas b/medley_new/src/media/UAudioPlayback_Bass.pas
index 1d7a44dc..8e1e5a9f 100644
--- a/medley_new/src/media/UAudioPlayback_Bass.pas
+++ b/medley_new/src/media/UAudioPlayback_Bass.pas
@@ -81,6 +81,7 @@ type
procedure Pause(); override;
procedure Stop(); override;
procedure FadeIn(Time: real; TargetVolume: single); override;
+ procedure Fade(Time: real; TargetVolume: single); override;
procedure AddSoundEffect(Effect: TSoundEffect); override;
procedure RemoveSoundEffect(Effect: TSoundEffect); override;
@@ -339,6 +340,12 @@ begin
BASS_ChannelSlideAttribute(Handle, BASS_ATTRIB_VOL, TargetVolume, Trunc(Time * 1000));
end;
+procedure TBassPlaybackStream.Fade(Time: real; TargetVolume: single);
+begin
+ // start fade-in: slide from fadeStart- to fadeEnd-volume in FadeTime
+ BASS_ChannelSlideAttribute(Handle, BASS_ATTRIB_VOL, TargetVolume, Trunc(Time * 1000));
+end;
+
procedure TBassPlaybackStream.Pause();
begin
BASS_ChannelPause(Handle);