[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    PATCH to load artsdsp in nsplugins
From:       Stefan Schimanski <1SteinList () gmx ! de>
Date:       2001-01-29 20:05:36
[Download RAW message or body]

Hi,

please checkout this patch if you have a sound driver that doesn't support 
non-blocking access to /dev/dsp. The flash plugin for example is known to 
freeze konqi on such systems. I can't test this code here, so I depend on 
your feedback!

Howto:
1) get artsd to access /dev/dsp (play some sound with noatun)
2) load a webpage with flash content (www.autsch.de for example)
3) check whether the sound of the flash plugin works

Schimmi

---------------------------------

diff -u -p -B -w -r1.23 nspluginloader.cpp
--- nspluginloader.cpp  2001/01/26 09:03:11     1.23
+++ nspluginloader.cpp  2001/01/29 19:54:40
@@ -95,6 +95,15 @@ NSPluginLoader::NSPluginLoader()
   KConfig cfg("kcmnspluginrc", false);
   cfg.setGroup("Misc");
   _useArtsdsp = cfg.readBoolEntry( "useArtsdsp", false );
+
+  // check whether the /dev/dsp is available
+  FILE *f = fopen( "/dev/dsp", "r+" );
+  if( f )
+      fclose( f );
+  else {
+      kdDebug() << "NSPluginLoader::NSPluginLoader /dev/dsp inaccessible, 
using artsdsp" << endl;
+      _useArtsdsp = true;
+  }
 }



["nsplugins.patch" (text/x-c++)]

Index: nspluginloader.cpp
===================================================================
RCS file: /home/kde/kdebase/nsplugins/nspluginloader.cpp,v
retrieving revision 1.23
diff -u -p -B -w -r1.23 nspluginloader.cpp
--- nspluginloader.cpp	2001/01/26 09:03:11	1.23
+++ nspluginloader.cpp	2001/01/29 20:00:13
@@ -95,6 +95,15 @@ NSPluginLoader::NSPluginLoader()
   KConfig cfg("kcmnspluginrc", false);
   cfg.setGroup("Misc");
   _useArtsdsp = cfg.readBoolEntry( "useArtsdsp", false );
+
+  // check whether the /dev/dsp is available
+  FILE *f = fopen( "/dev/dsp", "r+" );
+  if( f )
+      fclose( f );
+  else {
+      kdDebug() << "NSPluginLoader::NSPluginLoader /dev/dsp inaccessible, using artsdsp" << endl;
+      _useArtsdsp = true;
+  }
 }
 
 

_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic