You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3coop/apps/openmw/mwsound
scrawl 530fb61ad0 Use OpenThreads instead of boost thread
This should allow OpenMW to work better with git versions of openscenegraph. OSG dev version 3.5.5 added the setting of thread affinity for the main thread. The problem is that in the boost/standard threading libraries, the affinity of a thread is inherited by any further threads launched from that thread, leading to these threads always running on the same core as the main thread unless you tell them not to.

With OpenThreads, the default affinity of a thread is none, no matter what parent thread it was launched from.

So, when using custom threading with OSG 3.6+, we have these options:
1. explicitely tell OSG to *not* set the thread affinity
or 2. explicitely set the thread affinity of additional threads created (possible with boost, but not possible with std::thread)
or 3. use OpenThreads
or 4. accept the suboptimal performance of non-OSG threads (in OpenMW's case the sound streaming & video threads) running on the same core as the main thread

This patch opts for 3.)

Reference: http://forum.openscenegraph.org/viewtopic.php?t=16158
8 years ago
..
ffmpeg_decoder.cpp Remove now unused Sound_Decoder::rewind() 9 years ago
ffmpeg_decoder.hpp Remove now unused Sound_Decoder::rewind() 9 years ago
loudness.cpp Analyze the loudness data as the stream is decoded for playback 9 years ago
loudness.hpp Analyze the loudness data as the stream is decoded for playback 9 years ago
movieaudiofactory.cpp Remove now unused Sound_Decoder::rewind() 9 years ago
movieaudiofactory.hpp Rename to osg-ffmpeg-videoplayer 10 years ago
openal_output.cpp Use OpenThreads instead of boost thread 8 years ago
openal_output.hpp Don't analyze the loudness for sounds that don't need it 9 years ago
sound.hpp Use a premade Sound object for the output's playSound functions 9 years ago
sound_buffer.hpp Include cleanup 9 years ago
sound_decoder.hpp Remove now unused Sound_Decoder::rewind() 9 years ago
sound_output.hpp Don't analyze the loudness for sounds that don't need it 9 years ago
soundmanagerimp.cpp Don't analyze the loudness for sounds that don't need it 9 years ago
soundmanagerimp.hpp Analyze the loudness data as the stream is decoded for playback 9 years ago