diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-30 13:49:10 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-30 13:49:10 +0000 |
commit | c61600bfdda6608feb6a390d20e2e1200afe93f6 (patch) | |
tree | c5bd160c48f737e940f2f4e60e583d37d972ca11 /src/media/UAudioInput_Portaudio.pas | |
parent | c75faaea68dd7be35fd56b3caf91483c7eef0611 (diff) | |
download | usdx-c61600bfdda6608feb6a390d20e2e1200afe93f6.tar.gz usdx-c61600bfdda6608feb6a390d20e2e1200afe93f6.tar.xz usdx-c61600bfdda6608feb6a390d20e2e1200afe93f6.zip |
portaudio playback (not used by default) segfault fixed
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2321 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | src/media/UAudioInput_Portaudio.pas | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/media/UAudioInput_Portaudio.pas b/src/media/UAudioInput_Portaudio.pas index 92e549ff..c7364eb4 100644 --- a/src/media/UAudioInput_Portaudio.pas +++ b/src/media/UAudioInput_Portaudio.pas @@ -492,27 +492,20 @@ begin end; function TAudioInput_Portaudio.InitializeRecord(): boolean; -var - err: TPaError; begin + Result := false; AudioCore := TAudioCore_Portaudio.GetInstance(); // initialize portaudio - err := Pa_Initialize(); - if (err <> paNoError) then - begin - Log.LogError(Pa_GetErrorText(err), 'TAudioInput_Portaudio.InitializeRecord'); - Result := false; - Exit; - end; - + if (not AudioCore.Initialize()) then + Exit; Result := EnumDevices(); end; function TAudioInput_Portaudio.FinalizeRecord: boolean; begin CaptureStop; - Pa_Terminate(); + AudioCore.Terminate(); Result := inherited FinalizeRecord(); end; |