\r
struct oal_consumer : public core::frame_consumer, public sf::SoundStream\r
{\r
- spl::shared_ptr<diagnostics::graph> graph_;\r
+ spl::shared_ptr<diagnostics::graph> graph_;\r
boost::timer perf_timer_;\r
int channel_index_;\r
\r
tbb::concurrent_bounded_queue<std::shared_ptr<audio_buffer_16>> input_;\r
boost::circular_buffer<audio_buffer_16> container_;\r
tbb::atomic<bool> is_running_;\r
- core::audio_buffer temp;\r
+ bool set_thread_priority_;\r
\r
core::video_format_desc format_desc_;\r
public:\r
oal_consumer() \r
: container_(16)\r
, channel_index_(-1)\r
+ , set_thread_priority_(true)\r
{\r
graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f)); \r
graph_->set_color("dropped-frame", diagnostics::color(0.3f, 0.6f, 0.3f));\r
\r
bool OnGetData(sf::SoundStream::Chunk& data) override\r
{ \r
+ if(set_thread_priority_)\r
+ {\r
+ SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);\r
+ set_thread_priority_ = false;\r
+ }\r
+\r
std::shared_ptr<audio_buffer_16> audio_data; \r
input_.pop(audio_data);\r
\r