Changeset 263
- Timestamp:
- 07/04/08 23:00:04 (4 years ago)
- Location:
- trunk/fm_server/src
- Files:
-
- 2 modified
-
fm_output_alsa.c (modified) (3 diffs)
-
fm_utils.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fm_server/src/fm_output_alsa.c
r232 r263 31 31 #include <alsa/asoundlib.h> 32 32 33 #include "fm_utils.h" 33 34 #include "src_type_conv.h" 34 35 #include "fm_buffer.h" … … 42 43 43 44 #define ALSA_DEFAULT_DEVICE "default" 44 //#define ALSA_DEFAULT_DEVICE "surround40"45 45 #define ALSA_DEFAULT_SAMPLE_RATE 44100 46 46 //#define ALSA_DEFAULT_SAMPLE_RATE 48000 … … 477 477 FmElement *element = FM_ELEMENT (data); 478 478 FmOutputAlsa *output_alsa = FM_OUTPUT_ALSA (data); 479 480 g_thread_set_rt (NULL, 10); 479 481 480 482 while (!output_alsa->stop_processing) { -
trunk/fm_server/src/fm_utils.c
r194 r263 26 26 27 27 #ifdef G_OS_UNIX 28 #include <sys/types.h> 29 #include <unistd.h> 28 30 #include <sched.h> 29 31 #include <errno.h> … … 31 33 #include <pthread.h> 32 34 #endif 35 36 #include <config.h> 33 37 34 38 #include "fm_utils.h" … … 41 45 #ifdef HAVE_SCHED_SETSCHEDULER 42 46 43 pthread_t th = pthread_self();47 //pthread_t th = pthread_self(); 44 48 struct sched_param param; 45 49 46 50 param.sched_priority = prio; 47 51 48 if (sched_setscheduler( th, SCHED_FIFO, ¶m)) {52 if (sched_setscheduler(0, SCHED_FIFO, ¶m)) { 49 53 g_warning("Failed to set thread %p to SCHED_FIFO with prio %d: %s", gthread, prio, strerror(errno)); 50 54 return FALSE;
