summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2014-02-02 10:10:36 +0000
committerAlexey Kulakov <panda75@bk.ru>2014-02-02 10:10:36 +0000
commite1e42ee201b9a6365990df6943abdef8ed84c20b (patch)
treee73b8cfedc5b57f34fee84b9824ccaf1a58c8c4b /plugins
parent7c53c3c262dd67bbe9bcac3971621face2455f82 (diff)
mRadio: BASSinterface plugin compatibility
git-svn-id: http://svn.miranda-ng.org/main/trunk@8001 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mRadio/rbass.pas14
1 files changed, 12 insertions, 2 deletions
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');