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_Portaudio.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_Portaudio.pas')
-rw-r--r-- | Game/Code/Classes/UAudioCore_Portaudio.pas | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Game/Code/Classes/UAudioCore_Portaudio.pas b/Game/Code/Classes/UAudioCore_Portaudio.pas index bb0635b3..cd228982 100644 --- a/Game/Code/Classes/UAudioCore_Portaudio.pas +++ b/Game/Code/Classes/UAudioCore_Portaudio.pas @@ -16,9 +16,12 @@ uses type TAudioCore_Portaudio = class + private + constructor Create(); public - class function GetPreferredApiIndex(): TPaHostApiIndex; - class function TestDevice(inParams, outParams: PPaStreamParameters; var sampleRate: Double): boolean; + class function GetInstance(): TAudioCore_Portaudio; + function GetPreferredApiIndex(): TPaHostApiIndex; + function TestDevice(inParams, outParams: PPaStreamParameters; var sampleRate: Double): boolean; end; implementation @@ -57,10 +60,24 @@ const array[0..0] of TPaHostApiTypeId = ( paDefaultApi ); {$IFEND} +var + Instance: TAudioCore_Portaudio; { TAudioInput_Portaudio } -class function TAudioCore_Portaudio.GetPreferredApiIndex(): TPaHostApiIndex; +constructor TAudioCore_Portaudio.Create(); +begin + inherited; +end; + +class function TAudioCore_Portaudio.GetInstance(): TAudioCore_Portaudio; +begin + if not assigned(Instance) then + Instance := TAudioCore_Portaudio.Create(); + Result := Instance; +end; + +function TAudioCore_Portaudio.GetPreferredApiIndex(): TPaHostApiIndex; var i: integer; apiIndex: TPaHostApiIndex; @@ -148,7 +165,7 @@ end; * So we have to provide the possibility to manually select an output device * in the UltraStar options if we want to use portaudio instead of SDL. *) -class function TAudioCore_Portaudio.TestDevice(inParams, outParams: PPaStreamParameters; var sampleRate: Double): boolean; +function TAudioCore_Portaudio.TestDevice(inParams, outParams: PPaStreamParameters; var sampleRate: Double): boolean; var stream: PPaStream; err: TPaError; |