diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-09 19:19:28 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-09 19:19:28 +0000 |
commit | b5a738fa52c8b0f2212deb5febd2d7f0b8f6544f (patch) | |
tree | 3c2812cffdd035b385d5b0f0f8f5ea0702973739 /Game/Code/Classes/UAudioCore_Bass.pas | |
parent | 37744cee627605db0675efd3a6e0c42bd51c48d6 (diff) | |
download | usdx-b5a738fa52c8b0f2212deb5febd2d7f0b8f6544f.tar.gz usdx-b5a738fa52c8b0f2212deb5febd2d7f0b8f6544f.tar.xz usdx-b5a738fa52c8b0f2212deb5febd2d7f0b8f6544f.zip |
- input-source selection works now (with bass or portaudio with portmixer)
- audio-effects (DSP) interface for audio-playback plus a simple voice removal example (does not sound that good)
- FFMpeg support for BASS
- audio-clock for FFMpeg for GetPosition and synchronisation
- more compatible seeking in FFMpeg
- clean termination of the audio interfaces/streams (especially ffmpeg)
- Audio output device enumeration (selection will be added later to the sounds option screen)
- display of threshold and volume in the record-options screen
- threshold and volume can be changed with the 'T' (threshold) and '+'/'-' (source volume) keys
- added a FadeIn() method to the IAudioPlayback interface
- some minor changes to the audio classes/screens
- new base-class for audio-playback classes (used by bass, portaudio and sdl)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1078 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UAudioCore_Bass.pas')
-rw-r--r-- | Game/Code/Classes/UAudioCore_Bass.pas | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/Game/Code/Classes/UAudioCore_Bass.pas b/Game/Code/Classes/UAudioCore_Bass.pas index 9c13b461..442c999b 100644 --- a/Game/Code/Classes/UAudioCore_Bass.pas +++ b/Game/Code/Classes/UAudioCore_Bass.pas @@ -9,8 +9,12 @@ interface {$I switches.inc}
uses
+ {$IFDEF MSWINDOWS}
+ Windows,
+ {$ENDIF}
Classes,
- SysUtils;
+ SysUtils,
+ UMusic;
type
TAudioCore_Bass = class
@@ -18,6 +22,7 @@ type public
class function ErrorGetString(): string; overload;
class function ErrorGetString(errCode: integer): string; overload;
+ class function ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
end;
@@ -113,4 +118,22 @@ begin end;
end;
-end.
\ No newline at end of file +class function TAudioCore_Bass.ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
+begin
+ case Format of
+ asfS16:
+ Flags := 0;
+ asfFloat:
+ Flags := BASS_SAMPLE_FLOAT;
+ asfU8:
+ Flags := BASS_SAMPLE_8BITS;
+ else begin
+ Result := false;
+ Exit;
+ end;
+ end;
+
+ Result := true;
+end;
+
+end.
|