Annotation of libsoftmpeg/fusionsound_realtimepriority_reset_on_flush.diff, revision 1.1

1.1     ! hunold      1: diff -u -r1.13 ifusionsoundstream.c
        !             2: --- src/ifusionsoundstream.c   5 Feb 2004 13:01:37 -0000       1.13
        !             3: +++ src/ifusionsoundstream.c   5 Feb 2004 15:55:32 -0000
        !             4: @@ -30,6 +30,7 @@
        !             5:  #include <stdlib.h>
        !             6:  #include <unistd.h>
        !             7:  #include <string.h>
        !             8: +#include <sys/ioctl.h>
        !             9:  
        !            10:  #include <math.h>
        !            11:  
        !            12: @@ -330,6 +331,9 @@
        !            13:       /* Reset the buffer. */
        !            14:       data->pos_write = data->pos_read;
        !            15:  
        !            16: +     /* flush pending sound data so we don't have to wait */
        !            17: +     fs_core_reset( data->core );
        !            18: +
        !            19:       pthread_mutex_unlock( &data->lock );
        !            20:  
        !            21:       return DFB_OK;
        !            22: diff -u -r1.21 core_sound.c
        !            23: --- src/core/core_sound.c      3 Feb 2004 17:38:33 -0000       1.21
        !            24: +++ src/core/core_sound.c      5 Feb 2004 15:55:32 -0000
        !            25: @@ -286,6 +286,12 @@
        !            26:       return DFB_OK;
        !            27:  }
        !            28:  
        !            29: +void
        !            30: +fs_core_reset( CoreSound *core )
        !            31: +{
        !            32: +    ioctl( core->fd, SNDCTL_DSP_RESET, 0 );
        !            33: +}
        !            34: +
        !            35:  int
        !            36:  fs_core_output_delay( CoreSound *core )
        !            37:  {
        !            38: @@ -313,6 +319,12 @@
        !            39:  
        !            40:       bool             empty = true;
        !            41:  
        !            42: +     struct sched_param param;
        !            43: +     int policy;
        !            44: +     pthread_t pthread = pthread_self();
        !            45: +     pthread_getschedparam(pthread, &policy, &param);
        !            46: +     param.sched_priority = 10;       
        !            47: +     pthread_setschedparam(pthread, SCHED_RR, &param);
        !            48:  
        !            49:       while (true) {
        !            50:            int             i;
        !            51: diff -u -r1.3 core_sound.h
        !            52: --- src/core/core_sound.h      16 Jan 2004 16:31:38 -0000      1.3
        !            53: +++ src/core/core_sound.h      5 Feb 2004 15:55:32 -0000
        !            54: @@ -57,5 +57,10 @@
        !            55:   */
        !            56:  int fs_core_output_delay( CoreSound *core );
        !            57:  
        !            58: +/*
        !            59: + * Resets the sound device
        !            60: + */
        !            61: +void fs_core_reset( CoreSound *core );
        !            62: +
        !            63:  #endif
        !            64:  

LinuxTV legacy CVS <linuxtv.org/cvs>