267 |
|
set_audio_status_format(); |
268 |
|
|
269 |
|
// Start streaming thread |
270 |
< |
pthread_attr_init(&stream_thread_attr); |
271 |
< |
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) |
272 |
< |
if (geteuid() == 0) { |
273 |
< |
pthread_attr_setinheritsched(&stream_thread_attr, PTHREAD_EXPLICIT_SCHED); |
274 |
< |
pthread_attr_setschedpolicy(&stream_thread_attr, SCHED_FIFO); |
275 |
< |
struct sched_param fifo_param; |
276 |
< |
fifo_param.sched_priority = (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2; |
277 |
< |
pthread_attr_setschedparam(&stream_thread_attr, &fifo_param); |
278 |
< |
} |
279 |
< |
#endif |
280 |
< |
stream_thread_cancel = false; |
270 |
> |
Set_pthread_attr(&stream_thread_attr, 0); |
271 |
|
stream_thread_active = (pthread_create(&stream_thread, &stream_thread_attr, stream_func, NULL) == 0); |
272 |
|
|
273 |
|
// Everything went fine |