aboutsummaryrefslogtreecommitdiff
path: root/dev/libs/pwlib/pwlib-1.10.10.diff.improved
diff options
context:
space:
mode:
Diffstat (limited to 'dev/libs/pwlib/pwlib-1.10.10.diff.improved')
-rw-r--r--dev/libs/pwlib/pwlib-1.10.10.diff.improved31
1 files changed, 31 insertions, 0 deletions
diff --git a/dev/libs/pwlib/pwlib-1.10.10.diff.improved b/dev/libs/pwlib/pwlib-1.10.10.diff.improved
new file mode 100644
index 00000000..3774ed64
--- /dev/null
+++ b/dev/libs/pwlib/pwlib-1.10.10.diff.improved
@@ -0,0 +1,31 @@
+--- plugins/sound_oss/sound_oss.cxx.orig 2008-03-28 20:17:52.000000000 -0300
++++ plugins/sound_oss/sound_oss.cxx 2008-03-28 21:06:13.000000000 -0300
+@@ -359,7 +359,7 @@
+ struct stat s;
+ if (lstat(devname, &s) == 0) {
+ // OSS compatible audio major device numbers (OSS, SAM9407, etc)
+- static const unsigned deviceNumbers[] = { 14, 145 };
++ static const unsigned deviceNumbers[] = { 14, 145, 246 };
+ for (PINDEX i = 0; i < PARRAYSIZE(deviceNumbers); i++) {
+ if ((s.st_rdev >> 8) == deviceNumbers[i]) {
+ PINDEX cardnum = (s.st_rdev >> 4) & 15;
+@@ -543,16 +543,13 @@
+
+ // this is the first time this device has been used
+ // open the device in read/write mode always
+- // open the device in non-blocking mode to avoid hang if already open
+- os_handle = ::open((const char *)_device, O_RDWR | O_NONBLOCK);
++ // open the device without non-blocking mode, as documented in
++ // http://manuals.opensound.com/developer/open.html
++ os_handle = ::open((const char *)_device, O_RDWR);
+
+ if ((os_handle < 0) && (errno != EWOULDBLOCK))
+ return ConvertOSError(os_handle);
+
+- // switch to blocking mode
+- DWORD cmd = 0;
+- ::ioctl(os_handle, FIONBIO, &cmd);
+-
+ // add the device to the dictionary
+ SoundHandleEntry * entry = PNEW SoundHandleEntry;
+ handleDict().SetAt(_device, entry);