Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 372413
Collapse All | Expand All

(-)a/pa_common/pa_host.h (-4 / +6 lines)
Lines 48-64 extern "C" Link Here
48
#define SUPPORT_AUDIO_CAPTURE  (1)
48
#define SUPPORT_AUDIO_CAPTURE  (1)
49
#endif
49
#endif
50
50
51
#include <inttypes.h>
52
51
#ifndef int32
53
#ifndef int32
52
    typedef long int32;
54
    typedef int32_t int32;
53
#endif
55
#endif
54
#ifndef uint32
56
#ifndef uint32
55
    typedef unsigned long uint32;
57
    typedef uint32_t uint32;
56
#endif
58
#endif
57
#ifndef int16
59
#ifndef int16
58
    typedef short int16;
60
    typedef int16_t int16;
59
#endif
61
#endif
60
#ifndef uint16
62
#ifndef uint16
61
    typedef unsigned short uint16;
63
    typedef uint16_t uint16;
62
#endif
64
#endif
63
65
64
/* Used to convert between various sample formats. */
66
/* Used to convert between various sample formats. */
(-)a/pa_common/pa_lib.c (-5 / +5 lines)
Lines 498-507 internalPortAudioStream* PaHost_GetStreamRepresentation( PortAudioStream *stream Link Here
498
#define PA_DITHER_SCALE  (1.0f / ((1<<PA_DITHER_BITS)-1))
498
#define PA_DITHER_SCALE  (1.0f / ((1<<PA_DITHER_BITS)-1))
499
long PaConvert_TriangularDither( void )
499
long PaConvert_TriangularDither( void )
500
{
500
{
501
    static unsigned long previous = 0;
501
    static uint32 previous = 0;
502
    static unsigned long randSeed1 = 22222;
502
    static uint32 randSeed1 = 22222;
503
    static unsigned long randSeed2 = 5555555;
503
    static uint32 randSeed2 = 5555555;
504
    long current, highPass;
504
    int32 current, highPass;
505
    /* Generate two random numbers. */
505
    /* Generate two random numbers. */
506
    randSeed1 = (randSeed1 * 196314165) + 907633515;
506
    randSeed1 = (randSeed1 * 196314165) + 907633515;
507
    randSeed2 = (randSeed2 * 196314165) + 907633515;
507
    randSeed2 = (randSeed2 * 196314165) + 907633515;
Lines 510-516 long PaConvert_TriangularDither( void ) Link Here
510
     * Also shift an extra bit for the high pass filter. 
510
     * Also shift an extra bit for the high pass filter. 
511
     */
511
     */
512
#define DITHER_SHIFT  ((32 - PA_DITHER_BITS) + 1)
512
#define DITHER_SHIFT  ((32 - PA_DITHER_BITS) + 1)
513
    current = (((long)randSeed1)>>DITHER_SHIFT) + (((long)randSeed2)>>DITHER_SHIFT);
513
    current = (((int32)randSeed1)>>DITHER_SHIFT) + (((int32)randSeed2)>>DITHER_SHIFT);
514
    /* High pass filter to reduce audibility. */
514
    /* High pass filter to reduce audibility. */
515
    highPass = current - previous;
515
    highPass = current - previous;
516
    previous = current;
516
    previous = current;

Return to bug 372413