115 |
|
sound_buffer_size = (AudioStatus.sample_size>>3) * AudioStatus.channels * audio_frames_per_block; |
116 |
|
|
117 |
|
// Start audio thread |
118 |
< |
pthread_attr_init(&stream_thread_attr); |
119 |
< |
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) |
120 |
< |
pthread_attr_setinheritsched(&stream_thread_attr, PTHREAD_EXPLICIT_SCHED); |
121 |
< |
pthread_attr_setschedpolicy(&stream_thread_attr, SCHED_FIFO); |
122 |
< |
struct sched_param fifo_param; |
123 |
< |
fifo_param.sched_priority = (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2; |
124 |
< |
pthread_attr_setschedparam(&stream_thread_attr, &fifo_param); |
125 |
< |
#endif |
118 |
> |
Set_pthread_attr(&stream_thread_attr, 0); |
119 |
|
stream_thread_active = (pthread_create(&stream_thread, &stream_thread_attr, stream_func, NULL) == 0); |
120 |
|
|
121 |
|
// Everything OK |