From e1e42ee201b9a6365990df6943abdef8ed84c20b Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Sun, 2 Feb 2014 10:10:36 +0000 Subject: mRadio: BASSinterface plugin compatibility git-svn-id: http://svn.miranda-ng.org/main/trunk@8001 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/mRadio/rbass.pas | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'plugins/mRadio') diff --git a/plugins/mRadio/rbass.pas b/plugins/mRadio/rbass.pas index 91728b4d32..c641dc6194 100644 --- a/plugins/mRadio/rbass.pas +++ b/plugins/mRadio/rbass.pas @@ -235,17 +235,27 @@ begin end; num:=GetDeviceNumber; + // Bass_ErrorGetCode=BASS_ERROR_NO3D result:=BASS_Init(num,44100,BASS_DEVICE_3D,0,nil); - if not result then + if (not result) and (Bass_ErrorGetCode()=BASS_ERROR_NO3D) then result:=BASS_Init(num,44100,0,0,nil); // not default device choosed - check default now if (not result) and (num>=0) then begin result:=BASS_Init(-1,44100,BASS_DEVICE_3D,0,nil); - if not result then + if (not result) and (Bass_ErrorGetCode()=BASS_ERROR_NO3D) then result:=BASS_Init(-1,44100,0,0,nil); end; + // BASS interface compatibility + if not result then + begin + if BASS_ErrorGetCode()=BASS_ERROR_ALREADY then + begin + result:=true; + end; + end; + if not result then begin ErrorCustom('Can''t initialize device'); -- cgit v1.2.3