summaryrefslogtreecommitdiff
path: root/audio/nas/files/patch-server_dda_voxware_config.c
blob: 3acfe5bef98a7d7dd48b493caf50fe7f39bf0208 (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
--- server/dda/voxware/config.c.orig	2007-06-16 23:03:22.000000000 +0400
+++ server/dda/voxware/config.c	2008-05-14 22:49:23.000000000 +0400
@@ -5,6 +5,7 @@
  */
 
 #include <fcntl.h>
+#include <inttypes.h>
 #include "nasconf.h"
 #include "config.h"
 #include "aulog.h"
@@ -27,7 +28,7 @@
 
     switch (token) {
     case CONF_SET_SECTION:
-        num = (int) value;
+        num = (intptr_t) value;
 
         if (num == INPUTSECTION) {      /* we're in the input section */
             confStat = &sndStatIn;
@@ -37,12 +38,12 @@
         break;
 
     case FORCERATE:
-        num = (int) value;
+        num = (intptr_t) value;
         confStat->forceRate = num;
         break;
 
     case GAINSCALE:
-        num = (int) value;
+        num = (intptr_t) value;
         if (num < 0 || num > 100)
             osLogMsg("config: gain scaling must be within the range 0-100\n");
         else
@@ -50,7 +51,7 @@
         break;
 
     case GAIN:
-        num = (int) value;
+        num = (intptr_t) value;
         /* the default is 50, so if it's just out of range, don't
            reset it */
         if (num < 0 || num > 100)
@@ -61,12 +62,12 @@
         break;
 
     case AUTOOPEN:
-        num = (int) value;
+        num = (intptr_t) value;
         confStat->autoOpen = num;
         break;
 
     case READWRITE:
-        num = (int) value;
+        num = (intptr_t) value;
         if (confStat == &sndStatIn) {
             confStat->howToOpen = (num ? O_RDWR : O_RDONLY);
         } else {
@@ -89,7 +90,7 @@
         break;
 
     case WORDSIZE:
-        num = (int) value;
+        num = (intptr_t) value;
 
         if (num != 8 && num != 16) {
             osLogMsg("config: Wordsize (%d) not 8 or 16, setting to 8\n",
@@ -100,7 +101,7 @@
         break;
 
     case FRAGSIZE:
-        num = (int) value;
+        num = (intptr_t) value;
 
         {
             int i, j, k;
@@ -125,7 +126,7 @@
         break;
 
     case MINFRAGS:
-        num = (int) value;
+        num = (intptr_t) value;
 
         if (num < 2 || num > 32) {
             osLogMsg("config: Minfrags out of range - setting to 2\n");
@@ -138,7 +139,7 @@
         break;
 
     case MAXFRAGS:
-        num = (int) value;
+        num = (intptr_t) value;
 
         if (num < 2 || num > 32) {
             osLogMsg("config: Maxfrags out of range - setting to 32\n");
@@ -151,7 +152,7 @@
         break;
 
     case NUMCHANS:
-        num = (int) value;
+        num = (intptr_t) value;
 
         if (num != 1 && num != 2) {
             osLogMsg("config: Number of channels wrong, setting to 1\n");
@@ -161,25 +162,25 @@
         break;
 
     case MAXRATE:
-        num = (int) value;
+        num = (intptr_t) value;
 
         confStat->maxSampleRate = num;
         break;
 
     case MINRATE:
-        num = (int) value;
+        num = (intptr_t) value;
 
         confStat->minSampleRate = num;
         break;
 
     case MIXERINIT:
-        num = (int) value;
+        num = (intptr_t) value;
 
         VOXMixerInit = num;
         break;
 
     case REINITMIXER:
-        num = (int) value;
+        num = (intptr_t) value;
 
         VOXReInitMixer = num;
         break;