2011-04-20, 23:02
davilla Wrote:@bole5 -> git 52e7dc99a7cbd507a5f751364c25b0ad0ecc5bb0
Your changes brought in to trunk, I also switched to mutex usage.
Using CSliceQueue would be best as it is lockless and does not require mutex or critical-sections.
External libraries can be thread-safe or not. depends. av_fifo was used as it is very fast.
git e4f365fa60b5a80c8cd62c7886fc9208e78b0238 is also interesting
Thank you davilla for bringing the changes into trunk so quickly.
Regarding the locks and the tread-safety, I've worked on a (hopefully) better solution that can be used as a replacement for av_fifo buffer. I called it IOSAudioRingBuffer. It implements the "Read/Write Counts" Circular Buffer (http://en.wikipedia.org/wiki/Circular_bu...ite_Counts). This buffer is very robust and safe to use in multithreaded environments without requiring any locks, and should bring improvements in stability and enable easier debugging of audio problems.
The full diff can be found on pastebin: http://pastebin.com/xZxyv626.
For the brave people out there who would like to test if this audio fix helps address their problems with stability and rebooting when doing a lot of FFWD/RWD you can follow the instructions below and report your results. The binary was build on Apr 20 2011 Git:20110419-28f5811. If you don't understand the instructions below, please don't even try this...
1. Download the compiled XBMC file from: http://www.megaupload.com/?d=5PIEOLQC
2. Copy the file XBMC using your scp client to the folder: /Applications/AppleTV.app/Appliances/XBMC.frappliance/
3. Restart the ATV2 by running: killall AppleTV in unix shell, or reboot your ATV2
Enjoy