aboutsummaryrefslogtreecommitdiffstats
path: root/main/alsa-lib/alsa-lib-stdint.patch
blob: 16d4cbeb64556d1f01ec810065c778722df9661c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
diff -ru alsa-lib-1.1.0.orig/include/pcm.h alsa-lib-1.1.0/include/pcm.h
--- alsa-lib-1.1.0.orig/include/pcm.h	2015-11-09 09:39:18.000000000 +0200
+++ alsa-lib-1.1.0/include/pcm.h	2016-02-11 14:28:23.731309152 +0200
@@ -33,6 +33,7 @@
 extern "C" {
 #endif
 
+#include <stdint.h>
 /**
  *  \defgroup PCM PCM Interface
  *  See the \ref pcm page for more details.
@@ -1108,10 +1109,10 @@
 int snd_pcm_format_physical_width(snd_pcm_format_t format);		/* in bits */
 snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian);
 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
-u_int8_t snd_pcm_format_silence(snd_pcm_format_t format);
-u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
-u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
+uint8_t snd_pcm_format_silence(snd_pcm_format_t format);
+uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
+uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
+uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples);
 
 snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes);
Only in alsa-lib-1.1.0/include: pcm.h.orig
diff -ru alsa-lib-1.1.0.orig/src/pcm/pcm_misc.c alsa-lib-1.1.0/src/pcm/pcm_misc.c
--- alsa-lib-1.1.0.orig/src/pcm/pcm_misc.c	2015-11-09 09:39:18.000000000 +0200
+++ alsa-lib-1.1.0/src/pcm/pcm_misc.c	2016-02-11 14:28:27.741355826 +0200
@@ -387,7 +387,7 @@
  * \param format Sample format
  * \return silence 64 bit word
  */
-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
+uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
 {
 	switch (format) {
 	case SNDRV_PCM_FORMAT_S8:
@@ -467,7 +467,7 @@
 	{
 		union {
 			float f[2];
-			u_int64_t i;
+			uint64_t i;
 		} u;
 		u.f[0] = u.f[1] = 0.0;
 #ifdef SNDRV_LITTLE_ENDIAN
@@ -480,7 +480,7 @@
 	{
 		union {
 			double f;
-			u_int64_t i;
+			uint64_t i;
 		} u;
 		u.f = 0.0;
 #ifdef SNDRV_LITTLE_ENDIAN
@@ -493,7 +493,7 @@
 	{
 		union {
 			float f[2];
-			u_int64_t i;
+			uint64_t i;
 		} u;
 		u.f[0] = u.f[1] = 0.0;
 #ifdef SNDRV_LITTLE_ENDIAN
@@ -506,7 +506,7 @@
 	{
 		union {
 			double f;
-			u_int64_t i;
+			uint64_t i;
 		} u;
 		u.f = 0.0;
 #ifdef SNDRV_LITTLE_ENDIAN
@@ -539,10 +539,10 @@
  * \param format Sample format
  * \return silence 32 bit word
  */
-u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format)
+uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format)
 {
 	assert(snd_pcm_format_physical_width(format) <= 32);
-	return (u_int32_t)snd_pcm_format_silence_64(format);
+	return (uint32_t)snd_pcm_format_silence_64(format);
 }
 
 /**
@@ -550,10 +550,10 @@
  * \param format Sample format
  * \return silence 16 bit word
  */
-u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format)
+uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format)
 {
 	assert(snd_pcm_format_physical_width(format) <= 16);
-	return (u_int16_t)snd_pcm_format_silence_64(format);
+	return (uint16_t)snd_pcm_format_silence_64(format);
 }
 
 /**
@@ -561,10 +561,10 @@
  * \param format Sample format
  * \return silence 8 bit word
  */
-u_int8_t snd_pcm_format_silence(snd_pcm_format_t format)
+uint8_t snd_pcm_format_silence(snd_pcm_format_t format)
 {
 	assert(snd_pcm_format_physical_width(format) <= 8);
-	return (u_int8_t)snd_pcm_format_silence_64(format);
+	return (uint8_t)snd_pcm_format_silence_64(format);
 }
 
 /**
@@ -580,7 +580,7 @@
 		return 0;
 	switch (snd_pcm_format_physical_width(format)) {
 	case 4: {
-		u_int8_t silence = snd_pcm_format_silence_64(format);
+		uint8_t silence = snd_pcm_format_silence_64(format);
 		unsigned int samples1;
 		if (samples % 2 != 0)
 			return -EINVAL;
@@ -589,13 +589,13 @@
 		break;
 	}
 	case 8: {
-		u_int8_t silence = snd_pcm_format_silence_64(format);
+		uint8_t silence = snd_pcm_format_silence_64(format);
 		memset(data, silence, samples);
 		break;
 	}
 	case 16: {
-		u_int16_t silence = snd_pcm_format_silence_64(format);
-		u_int16_t *pdata = (u_int16_t *)data;
+		uint16_t silence = snd_pcm_format_silence_64(format);
+		uint16_t *pdata = (uint16_t *)data;
 		if (! silence)
 			memset(data, 0, samples * 2);
 		else {
@@ -605,8 +605,8 @@
 		break;
 	}
 	case 24: {
-		u_int32_t silence = snd_pcm_format_silence_64(format);
-		u_int8_t *pdata = (u_int8_t *)data;
+		uint32_t silence = snd_pcm_format_silence_64(format);
+		uint8_t *pdata = (uint8_t *)data;
 		if (! silence)
 			memset(data, 0, samples * 3);
 		else {
@@ -625,8 +625,8 @@
 		break;
 	}
 	case 32: {
-		u_int32_t silence = snd_pcm_format_silence_64(format);
-		u_int32_t *pdata = (u_int32_t *)data;
+		uint32_t silence = snd_pcm_format_silence_64(format);
+		uint32_t *pdata = (uint32_t *)data;
 		if (! silence)
 			memset(data, 0, samples * 4);
 		else {
@@ -636,8 +636,8 @@
 		break;
 	}
 	case 64: {
-		u_int64_t silence = snd_pcm_format_silence_64(format);
-		u_int64_t *pdata = (u_int64_t *)data;
+		uint64_t silence = snd_pcm_format_silence_64(format);
+		uint64_t *pdata = (uint64_t *)data;
 		if (! silence)
 			memset(data, 0, samples * 8);
 		else {
Only in alsa-lib-1.1.0/src/pcm: pcm_misc.c.orig