diff --git a/components/acs/Demos/player/player.lpi b/components/acs/Demos/player/player.lpi
index a53ffef36..193511f8c 100644
--- a/components/acs/Demos/player/player.lpi
+++ b/components/acs/Demos/player/player.lpi
@@ -35,16 +35,16 @@
-
+
-
+
-
+
@@ -55,12 +55,11 @@
-
-
-
-
+
+
+
@@ -145,10 +144,12 @@
+
-
-
+
+
+
@@ -222,7 +223,7 @@
-
+
@@ -244,7 +245,7 @@
-
+
@@ -721,19 +722,24 @@
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
@@ -796,24 +802,160 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -840,7 +982,7 @@
-
+
@@ -848,6 +990,13 @@
+
+
+
+
+
+
+
diff --git a/components/acs/Demos/player/umain.pas b/components/acs/Demos/player/umain.pas
index 5eeaa1faa..7fed5cbd1 100644
--- a/components/acs/Demos/player/umain.pas
+++ b/components/acs/Demos/player/umain.pas
@@ -142,7 +142,7 @@ begin
FStopped := True;
if (AudioOut1.Status <> tosIdle) then
AudioOut1.Stop;
- while (AudioOut1.Status <> tosIdle) do
+ while (AudioOut1.Status <> tosIdle) and (AudioOut1.Status <> tosUndefined) do
Application.Processmessages;
end;
diff --git a/components/acs/Src/drivers/linux/alsa.pas b/components/acs/Src/drivers/linux/alsa.pas
index de4dda388..3710441f6 100644
--- a/components/acs/Src/drivers/linux/alsa.pas
+++ b/components/acs/Src/drivers/linux/alsa.pas
@@ -69,6 +69,7 @@ uses
const
asoundlib_path = 'libasound.so*';
+ asoundlib_path_ = 'libasound.so';
var
AsoundlibLoaded : Boolean = False;
@@ -898,7 +899,9 @@ var
initialization
Path := FindLibs(asoundlib_path);
- if Path <> '' then Libhandle := dlopen(@Path[1], RTLD_NOW or RTLD_GLOBAL);
+ if Path <> '' then Libhandle := dlopen(@Path, RTLD_NOW or RTLD_GLOBAL);
+ if Libhandle=nil then
+ Libhandle := dlopen(asoundlib_path_, RTLD_NOW or RTLD_GLOBAL);
if Libhandle <> nil then
begin
AsoundlibLoaded := True;