alsa-lib_mixed_types.patch (3803B)
1 --- alsa-lib-1.0.25.orig/src/pcm/pcm_misc.c 2013-07-22 23:16:24.942000003 +0000 2 +++ alsa-lib-1.0.25/src/pcm/pcm_misc.c 2013-07-22 23:18:34.345000003 +0000 3 @@ -363,7 +363,7 @@ 4 * \param format Sample format 5 * \return silence 64 bit word 6 */ 7 -u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format) 8 +uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format) 9 { 10 switch (format) { 11 case SNDRV_PCM_FORMAT_S8: 12 @@ -437,7 +437,7 @@ 13 { 14 union { 15 float f[2]; 16 - u_int64_t i; 17 + uint64_t i; 18 } u; 19 u.f[0] = u.f[1] = 0.0; 20 #ifdef SNDRV_LITTLE_ENDIAN 21 @@ -450,7 +450,7 @@ 22 { 23 union { 24 double f; 25 - u_int64_t i; 26 + uint64_t i; 27 } u; 28 u.f = 0.0; 29 #ifdef SNDRV_LITTLE_ENDIAN 30 @@ -463,7 +463,7 @@ 31 { 32 union { 33 float f[2]; 34 - u_int64_t i; 35 + uint64_t i; 36 } u; 37 u.f[0] = u.f[1] = 0.0; 38 #ifdef SNDRV_LITTLE_ENDIAN 39 @@ -476,7 +476,7 @@ 40 { 41 union { 42 double f; 43 - u_int64_t i; 44 + uint64_t i; 45 } u; 46 u.f = 0.0; 47 #ifdef SNDRV_LITTLE_ENDIAN 48 @@ -509,10 +509,10 @@ 49 * \param format Sample format 50 * \return silence 32 bit word 51 */ 52 -u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format) 53 +uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format) 54 { 55 assert(snd_pcm_format_physical_width(format) <= 32); 56 - return (u_int32_t)snd_pcm_format_silence_64(format); 57 + return (uint32_t)snd_pcm_format_silence_64(format); 58 } 59 60 /** 61 @@ -520,10 +520,10 @@ 62 * \param format Sample format 63 * \return silence 16 bit word 64 */ 65 -u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format) 66 +uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format) 67 { 68 assert(snd_pcm_format_physical_width(format) <= 16); 69 - return (u_int16_t)snd_pcm_format_silence_64(format); 70 + return (uint16_t)snd_pcm_format_silence_64(format); 71 } 72 73 /** 74 @@ -531,10 +531,10 @@ 75 * \param format Sample format 76 * \return silence 8 bit word 77 */ 78 -u_int8_t snd_pcm_format_silence(snd_pcm_format_t format) 79 +uint8_t snd_pcm_format_silence(snd_pcm_format_t format) 80 { 81 assert(snd_pcm_format_physical_width(format) <= 8); 82 - return (u_int8_t)snd_pcm_format_silence_64(format); 83 + return (uint8_t)snd_pcm_format_silence_64(format); 84 } 85 86 /** 87 @@ -550,7 +550,7 @@ 88 return 0; 89 switch (snd_pcm_format_physical_width(format)) { 90 case 4: { 91 - u_int8_t silence = snd_pcm_format_silence_64(format); 92 + uint8_t silence = snd_pcm_format_silence_64(format); 93 unsigned int samples1; 94 if (samples % 2 != 0) 95 return -EINVAL; 96 @@ -559,13 +559,13 @@ 97 break; 98 } 99 case 8: { 100 - u_int8_t silence = snd_pcm_format_silence_64(format); 101 + uint8_t silence = snd_pcm_format_silence_64(format); 102 memset(data, silence, samples); 103 break; 104 } 105 case 16: { 106 - u_int16_t silence = snd_pcm_format_silence_64(format); 107 - u_int16_t *pdata = (u_int16_t *)data; 108 + uint16_t silence = snd_pcm_format_silence_64(format); 109 + uint16_t *pdata = (uint16_t *)data; 110 if (! silence) 111 memset(data, 0, samples * 2); 112 else { 113 @@ -575,8 +575,8 @@ 114 break; 115 } 116 case 24: { 117 - u_int32_t silence = snd_pcm_format_silence_64(format); 118 - u_int8_t *pdata = (u_int8_t *)data; 119 + uint32_t silence = snd_pcm_format_silence_64(format); 120 + uint8_t *pdata = (uint8_t *)data; 121 if (! silence) 122 memset(data, 0, samples * 3); 123 else { 124 @@ -595,8 +595,8 @@ 125 break; 126 } 127 case 32: { 128 - u_int32_t silence = snd_pcm_format_silence_64(format); 129 - u_int32_t *pdata = (u_int32_t *)data; 130 + uint32_t silence = snd_pcm_format_silence_64(format); 131 + uint32_t *pdata = (uint32_t *)data; 132 if (! silence) 133 memset(data, 0, samples * 4); 134 else { 135 @@ -606,8 +606,8 @@ 136 break; 137 } 138 case 64: { 139 - u_int64_t silence = snd_pcm_format_silence_64(format); 140 - u_int64_t *pdata = (u_int64_t *)data; 141 + uint64_t silence = snd_pcm_format_silence_64(format); 142 + uint64_t *pdata = (uint64_t *)data; 143 if (! silence) 144 memset(data, 0, samples * 8); 145 else {