Annotation of libsoftmpeg/fusionsound_realtimepriority_reset_on_flush.diff, revision 1.2
1.2 ! hunold 1: diff -u -u -r1.25 ifusionsoundstream.c
! 2: --- src/ifusionsoundstream.c 29 Apr 2004 21:37:24 -0000 1.25
! 3: +++ src/ifusionsoundstream.c 18 May 2004 19:40:43 -0000
! 4: @@ -257,6 +257,9 @@
1.1 hunold 5: data->pos_write = data->pos_read;
1.2 ! hunold 6: data->filled = 0;
1.1 hunold 7:
8: + /* flush pending sound data so we don't have to wait */
9: + fs_core_reset( data->core );
10: +
11: pthread_mutex_unlock( &data->lock );
12:
13: return DFB_OK;
1.2 ! hunold 14: diff -u -u -r1.29 core_sound.c
! 15: --- src/core/core_sound.c 5 May 2004 09:32:49 -0000 1.29
! 16: +++ src/core/core_sound.c 18 May 2004 19:40:45 -0000
! 17: @@ -366,6 +366,12 @@
1.1 hunold 18: return DFB_OK;
19: }
20:
21: +void
22: +fs_core_reset( CoreSound *core )
23: +{
24: + ioctl( core->fd, SNDCTL_DSP_RESET, 0 );
25: +}
26: +
27: int
28: fs_core_output_delay( CoreSound *core )
29: {
1.2 ! hunold 30: @@ -394,6 +400,12 @@
1.1 hunold 31:
32: bool empty = true;
33:
34: + struct sched_param param;
35: + int policy;
36: + pthread_t pthread = pthread_self();
37: + pthread_getschedparam(pthread, &policy, ¶m);
38: + param.sched_priority = 10;
39: + pthread_setschedparam(pthread, SCHED_RR, ¶m);
40:
41: while (true) {
42: int i;
1.2 ! hunold 43: diff -u -u -r1.5 core_sound.h
! 44: --- src/core/core_sound.h 30 Mar 2004 18:57:44 -0000 1.5
! 45: +++ src/core/core_sound.h 18 May 2004 19:40:45 -0000
! 46: @@ -62,5 +62,10 @@
1.1 hunold 47: */
48: int fs_core_output_delay( CoreSound *core );
49:
50: +/*
51: + * Resets the sound device
52: + */
53: +void fs_core_reset( CoreSound *core );
54: +
55: #endif
56:
LinuxTV legacy CVS <linuxtv.org/cvs>