First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 214697
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Timothy Redaelli <drizzt@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: James L. Hammons <jlhamm@acm.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
zsnes-1.51-r2.ebuild Tested ebuild with new patch included text/plain James L. Hammons 2008-04-02 12:55 0000 2.20 KB Details
zsnes-1.51-libao-thread.patch The patch patch James L. Hammons 2008-04-02 12:57 0000 663 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 214697 depends on: Show dependency tree
Bug 214697 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-03-25 14:28 0000
For libao to work properly the audio thread has to be created *after* the mutex
and condition is created otherwise the sound thread has a chance to deadlock
(as it was wont to do on my machine before I applied this patch :).

I can't take credit for this fix as it was posted on one of the zsnes dev
sites. As such, it's probably already upstream. But in lieu of an upstream
version bump any time soon, I think this patch should be rolled in here as -r2.

Patch below comes from
http://board.zsnes.com/phpBB2/viewtopic.php?p=157699&sid=4ead2f9a94c153be8e85916ad6ac2f8b

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

diff -ur zsnes-1.510/src/linux/audio.c zsnes-1.510-new/src/linux/audio.c 
--- zsnes-1.510/src/linux/audio.c   2007-01-09 20:19:12.000000000 -0500 
+++ zsnes-1.510-new/src/linux/audio.c   2007-12-30 20:33:07.000000000 -0500 
@@ -177,11 +177,7 @@ 
   } 
   else 
   { 
-    if (pthread_create(&audio_thread, 0, SoundThread_ao, 0)) 
-    { 
-      puts("pthread_create() failed."); 
-    } 
-    else if (pthread_mutex_init(&audio_mutex, 0)) 
+    if (pthread_mutex_init(&audio_mutex, 0)) 
     { 
       puts("pthread_mutex_init() failed."); 
     } 
@@ -189,6 +185,10 @@ 
     { 
       puts("pthread_cond_init() failed."); 
     } 
+    else if (pthread_create(&audio_thread, 0, SoundThread_ao, 0)) 
+    { 
+      puts("pthread_create() failed."); 
+    } 
     InitSampleControl(); 
   }

------- Comment #1 From James L. Hammons 2008-04-02 12:55:50 0000 -------
Created an attachment (id=148077) [details]
Tested ebuild with new patch included

------- Comment #2 From James L. Hammons 2008-04-02 12:57:08 0000 -------
Created an attachment (id=148078) [details]
The patch

------- Comment #3 From Timothy Redaelli 2008-05-09 19:15:11 0000 -------
Fixed, thanks

First Last Prev Next    No search results available      Search page      Enter new bug