diff options
Diffstat (limited to 'lib')
45 files changed, 53 insertions, 49 deletions
diff --git a/lib/rbcodec/codecs/a52.c b/lib/rbcodec/codecs/a52.c index da670308b8..3d7e56df03 100644 --- a/lib/rbcodec/codecs/a52.c +++ b/lib/rbcodec/codecs/a52.c | |||
@@ -173,7 +173,7 @@ enum codec_status codec_run(void) | |||
173 | /* The main decoding loop */ | 173 | /* The main decoding loop */ |
174 | 174 | ||
175 | while (1) { | 175 | while (1) { |
176 | enum codec_command_action action = ci->get_command(¶m); | 176 | long action = ci->get_command(¶m); |
177 | 177 | ||
178 | if (action == CODEC_ACTION_HALT) | 178 | if (action == CODEC_ACTION_HALT) |
179 | break; | 179 | break; |
diff --git a/lib/rbcodec/codecs/a52_rm.c b/lib/rbcodec/codecs/a52_rm.c index 3f07a43ce9..bbfd1c735f 100644 --- a/lib/rbcodec/codecs/a52_rm.c +++ b/lib/rbcodec/codecs/a52_rm.c | |||
@@ -148,7 +148,7 @@ enum codec_status codec_run(void) | |||
148 | int consumed, packet_offset; | 148 | int consumed, packet_offset; |
149 | int playback_on = -1; | 149 | int playback_on = -1; |
150 | size_t resume_offset; | 150 | size_t resume_offset; |
151 | enum codec_command_action action; | 151 | long action; |
152 | intptr_t param; | 152 | intptr_t param; |
153 | 153 | ||
154 | if (codec_init()) { | 154 | if (codec_init()) { |
diff --git a/lib/rbcodec/codecs/aac.c b/lib/rbcodec/codecs/aac.c index 015e332be2..5e289f0306 100644 --- a/lib/rbcodec/codecs/aac.c +++ b/lib/rbcodec/codecs/aac.c | |||
@@ -72,7 +72,7 @@ enum codec_status codec_run(void) | |||
72 | uint32_t sbr_fac = 1; | 72 | uint32_t sbr_fac = 1; |
73 | unsigned char c = 0; | 73 | unsigned char c = 0; |
74 | void *ret; | 74 | void *ret; |
75 | enum codec_command_action action; | 75 | long action; |
76 | intptr_t param; | 76 | intptr_t param; |
77 | bool empty_first_frame = false; | 77 | bool empty_first_frame = false; |
78 | 78 | ||
diff --git a/lib/rbcodec/codecs/adx.c b/lib/rbcodec/codecs/adx.c index 8a56320787..e6e4c6fe5f 100644 --- a/lib/rbcodec/codecs/adx.c +++ b/lib/rbcodec/codecs/adx.c | |||
@@ -236,7 +236,7 @@ enum codec_status codec_run(void) | |||
236 | /* The main decoder loop */ | 236 | /* The main decoder loop */ |
237 | 237 | ||
238 | while (!endofstream) { | 238 | while (!endofstream) { |
239 | enum codec_command_action action = ci->get_command(¶m); | 239 | long action = ci->get_command(¶m); |
240 | 240 | ||
241 | if (action == CODEC_ACTION_HALT) | 241 | if (action == CODEC_ACTION_HALT) |
242 | break; | 242 | break; |
diff --git a/lib/rbcodec/codecs/aiff.c b/lib/rbcodec/codecs/aiff.c index 210c2065db..2900ed2ecb 100644 --- a/lib/rbcodec/codecs/aiff.c +++ b/lib/rbcodec/codecs/aiff.c | |||
@@ -305,7 +305,7 @@ enum codec_status codec_run(void) | |||
305 | endofstream = 0; | 305 | endofstream = 0; |
306 | 306 | ||
307 | while (!endofstream) { | 307 | while (!endofstream) { |
308 | enum codec_command_action action = ci->get_command(¶m); | 308 | long action = ci->get_command(¶m); |
309 | 309 | ||
310 | if (action == CODEC_ACTION_HALT) | 310 | if (action == CODEC_ACTION_HALT) |
311 | break; | 311 | break; |
diff --git a/lib/rbcodec/codecs/aiff_enc.c b/lib/rbcodec/codecs/aiff_enc.c index f199e70743..8dec0bbff3 100644 --- a/lib/rbcodec/codecs/aiff_enc.c +++ b/lib/rbcodec/codecs/aiff_enc.c | |||
@@ -207,7 +207,7 @@ enum codec_status ICODE_ATTR codec_run(void) | |||
207 | /* main encoding loop */ | 207 | /* main encoding loop */ |
208 | while (1) | 208 | while (1) |
209 | { | 209 | { |
210 | enum codec_command_action action = ci->get_command(NULL); | 210 | long action = ci->get_command(NULL); |
211 | 211 | ||
212 | if (action != CODEC_ACTION_NULL) | 212 | if (action != CODEC_ACTION_NULL) |
213 | break; | 213 | break; |
diff --git a/lib/rbcodec/codecs/alac.c b/lib/rbcodec/codecs/alac.c index a3a5ad43b8..35c3645657 100644 --- a/lib/rbcodec/codecs/alac.c +++ b/lib/rbcodec/codecs/alac.c | |||
@@ -109,7 +109,7 @@ enum codec_status codec_run(void) | |||
109 | 109 | ||
110 | /* The main decoding loop */ | 110 | /* The main decoding loop */ |
111 | while (i < demux_res.num_sample_byte_sizes) { | 111 | while (i < demux_res.num_sample_byte_sizes) { |
112 | enum codec_command_action action = ci->get_command(¶m); | 112 | long action = ci->get_command(¶m); |
113 | 113 | ||
114 | if (action == CODEC_ACTION_HALT) | 114 | if (action == CODEC_ACTION_HALT) |
115 | break; | 115 | break; |
diff --git a/lib/rbcodec/codecs/ape.c b/lib/rbcodec/codecs/ape.c index a6c5254d45..0adc793ade 100644 --- a/lib/rbcodec/codecs/ape.c +++ b/lib/rbcodec/codecs/ape.c | |||
@@ -155,7 +155,7 @@ enum codec_status codec_run(void) | |||
155 | int res; | 155 | int res; |
156 | int firstbyte; | 156 | int firstbyte; |
157 | size_t resume_offset; | 157 | size_t resume_offset; |
158 | enum codec_command_action action; | 158 | long action; |
159 | intptr_t param; | 159 | intptr_t param; |
160 | 160 | ||
161 | if (codec_init()) { | 161 | if (codec_init()) { |
diff --git a/lib/rbcodec/codecs/asap.c b/lib/rbcodec/codecs/asap.c index 2c350ba450..8d1eb447cc 100644 --- a/lib/rbcodec/codecs/asap.c +++ b/lib/rbcodec/codecs/asap.c | |||
@@ -107,7 +107,7 @@ enum codec_status codec_run(void) | |||
107 | 107 | ||
108 | /* The main decoder loop */ | 108 | /* The main decoder loop */ |
109 | while (1) { | 109 | while (1) { |
110 | enum codec_command_action action = ci->get_command(¶m); | 110 | long action = ci->get_command(¶m); |
111 | 111 | ||
112 | if (action == CODEC_ACTION_HALT) | 112 | if (action == CODEC_ACTION_HALT) |
113 | break; | 113 | break; |
diff --git a/lib/rbcodec/codecs/atrac3_oma.c b/lib/rbcodec/codecs/atrac3_oma.c index 65d9ed8b38..d394fffdcb 100644 --- a/lib/rbcodec/codecs/atrac3_oma.c +++ b/lib/rbcodec/codecs/atrac3_oma.c | |||
@@ -50,7 +50,7 @@ enum codec_status codec_run(void) | |||
50 | int elapsed = 0; | 50 | int elapsed = 0; |
51 | size_t resume_offset; | 51 | size_t resume_offset; |
52 | intptr_t param; | 52 | intptr_t param; |
53 | enum codec_command_action action; | 53 | long action; |
54 | 54 | ||
55 | if (codec_init()) { | 55 | if (codec_init()) { |
56 | DEBUGF("codec init failed\n"); | 56 | DEBUGF("codec init failed\n"); |
diff --git a/lib/rbcodec/codecs/atrac3_rm.c b/lib/rbcodec/codecs/atrac3_rm.c index 4b528c0a8d..59dbd29cad 100644 --- a/lib/rbcodec/codecs/atrac3_rm.c +++ b/lib/rbcodec/codecs/atrac3_rm.c | |||
@@ -61,7 +61,7 @@ enum codec_status codec_run(void) | |||
61 | int playback_on = -1; | 61 | int playback_on = -1; |
62 | size_t resume_offset; | 62 | size_t resume_offset; |
63 | intptr_t param; | 63 | intptr_t param; |
64 | enum codec_command_action action; | 64 | long action; |
65 | 65 | ||
66 | if (codec_init()) { | 66 | if (codec_init()) { |
67 | DEBUGF("codec init failed\n"); | 67 | DEBUGF("codec init failed\n"); |
diff --git a/lib/rbcodec/codecs/au.c b/lib/rbcodec/codecs/au.c index 388c241140..632d6d64dd 100644 --- a/lib/rbcodec/codecs/au.c +++ b/lib/rbcodec/codecs/au.c | |||
@@ -270,7 +270,7 @@ enum codec_status codec_run(void) | |||
270 | endofstream = 0; | 270 | endofstream = 0; |
271 | 271 | ||
272 | while (!endofstream) { | 272 | while (!endofstream) { |
273 | enum codec_command_action action = ci->get_command(¶m); | 273 | long action = ci->get_command(¶m); |
274 | 274 | ||
275 | if (action == CODEC_ACTION_HALT) | 275 | if (action == CODEC_ACTION_HALT) |
276 | break; | 276 | break; |
diff --git a/lib/rbcodec/codecs/ay.c b/lib/rbcodec/codecs/ay.c index 88936df131..dc7b360a9c 100644 --- a/lib/rbcodec/codecs/ay.c +++ b/lib/rbcodec/codecs/ay.c | |||
@@ -97,7 +97,7 @@ next_track: | |||
97 | 97 | ||
98 | /* The main decoder loop */ | 98 | /* The main decoder loop */ |
99 | while (1) { | 99 | while (1) { |
100 | enum codec_command_action action = ci->get_command(¶m); | 100 | long action = ci->get_command(¶m); |
101 | 101 | ||
102 | if (action == CODEC_ACTION_HALT) | 102 | if (action == CODEC_ACTION_HALT) |
103 | break; | 103 | break; |
diff --git a/lib/rbcodec/codecs/codecs.h b/lib/rbcodec/codecs/codecs.h index afe33f0a5c..e04727fea8 100644 --- a/lib/rbcodec/codecs/codecs.h +++ b/lib/rbcodec/codecs/codecs.h | |||
@@ -46,6 +46,8 @@ | |||
46 | #include "gcc_extensions.h" | 46 | #include "gcc_extensions.h" |
47 | #include "load_code.h" | 47 | #include "load_code.h" |
48 | 48 | ||
49 | #include <limits.h> | ||
50 | |||
49 | #ifdef CODEC | 51 | #ifdef CODEC |
50 | #if defined(DEBUG) || defined(SIMULATOR) | 52 | #if defined(DEBUG) || defined(SIMULATOR) |
51 | #undef DEBUGF | 53 | #undef DEBUGF |
@@ -72,12 +74,12 @@ | |||
72 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ | 74 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ |
73 | 75 | ||
74 | /* increase this every time the api struct changes */ | 76 | /* increase this every time the api struct changes */ |
75 | #define CODEC_API_VERSION 47 | 77 | #define CODEC_API_VERSION 48 |
76 | 78 | ||
77 | /* update this to latest version if a change to the api struct breaks | 79 | /* update this to latest version if a change to the api struct breaks |
78 | backwards compatibility (and please take the opportunity to sort in any | 80 | backwards compatibility (and please take the opportunity to sort in any |
79 | new function which are "waiting" at the end of the function table) */ | 81 | new function which are "waiting" at the end of the function table) */ |
80 | #define CODEC_MIN_API_VERSION 47 | 82 | #define CODEC_MIN_API_VERSION 48 |
81 | 83 | ||
82 | /* reasons for calling codec main entrypoint */ | 84 | /* reasons for calling codec main entrypoint */ |
83 | enum codec_entry_call_reason { | 85 | enum codec_entry_call_reason { |
@@ -99,6 +101,8 @@ enum codec_command_action { | |||
99 | #ifdef HAVE_RECORDING | 101 | #ifdef HAVE_RECORDING |
100 | CODEC_ACTION_STREAM_FINISH = 2, | 102 | CODEC_ACTION_STREAM_FINISH = 2, |
101 | #endif | 103 | #endif |
104 | CODEC_ACTION_MIN = LONG_MIN, | ||
105 | CODEC_ACTION_MAX = LONG_MAX, | ||
102 | }; | 106 | }; |
103 | 107 | ||
104 | /* NOTE: To support backwards compatibility, only add new functions at | 108 | /* NOTE: To support backwards compatibility, only add new functions at |
@@ -144,7 +148,7 @@ struct codec_api { | |||
144 | /* Configure different codec buffer parameters. */ | 148 | /* Configure different codec buffer parameters. */ |
145 | void (*configure)(int setting, intptr_t value); | 149 | void (*configure)(int setting, intptr_t value); |
146 | /* Obtain command action on what to do next */ | 150 | /* Obtain command action on what to do next */ |
147 | enum codec_command_action (*get_command)(intptr_t *param); | 151 | long (*get_command)(intptr_t *param); |
148 | /* Determine whether the track should be looped, if applicable. */ | 152 | /* Determine whether the track should be looped, if applicable. */ |
149 | bool (*loop_track)(void); | 153 | bool (*loop_track)(void); |
150 | 154 | ||
diff --git a/lib/rbcodec/codecs/cook.c b/lib/rbcodec/codecs/cook.c index 402d1d3fa6..af1f5e1a87 100644 --- a/lib/rbcodec/codecs/cook.c +++ b/lib/rbcodec/codecs/cook.c | |||
@@ -57,7 +57,7 @@ enum codec_status codec_run(void) | |||
57 | int scrambling_unit_size, num_units; | 57 | int scrambling_unit_size, num_units; |
58 | size_t resume_offset; | 58 | size_t resume_offset; |
59 | intptr_t param; | 59 | intptr_t param; |
60 | enum codec_command_action action; | 60 | long action; |
61 | 61 | ||
62 | if (codec_init()) { | 62 | if (codec_init()) { |
63 | DEBUGF("codec init failed\n"); | 63 | DEBUGF("codec init failed\n"); |
diff --git a/lib/rbcodec/codecs/flac.c b/lib/rbcodec/codecs/flac.c index eab6e7c2bc..753115dc30 100644 --- a/lib/rbcodec/codecs/flac.c +++ b/lib/rbcodec/codecs/flac.c | |||
@@ -498,7 +498,7 @@ enum codec_status codec_run(void) | |||
498 | frame=0; | 498 | frame=0; |
499 | buf = ci->request_buffer(&bytesleft, MAX_FRAMESIZE); | 499 | buf = ci->request_buffer(&bytesleft, MAX_FRAMESIZE); |
500 | while (bytesleft) { | 500 | while (bytesleft) { |
501 | enum codec_command_action action = ci->get_command(¶m); | 501 | long action = ci->get_command(¶m); |
502 | 502 | ||
503 | if (action == CODEC_ACTION_HALT) | 503 | if (action == CODEC_ACTION_HALT) |
504 | break; | 504 | break; |
diff --git a/lib/rbcodec/codecs/gbs.c b/lib/rbcodec/codecs/gbs.c index 717f56c82f..01dab45586 100644 --- a/lib/rbcodec/codecs/gbs.c +++ b/lib/rbcodec/codecs/gbs.c | |||
@@ -86,7 +86,7 @@ next_track: | |||
86 | 86 | ||
87 | /* The main decoder loop */ | 87 | /* The main decoder loop */ |
88 | while (1) { | 88 | while (1) { |
89 | enum codec_command_action action = ci->get_command(¶m); | 89 | long action = ci->get_command(¶m); |
90 | 90 | ||
91 | if (action == CODEC_ACTION_HALT) | 91 | if (action == CODEC_ACTION_HALT) |
92 | break; | 92 | break; |
diff --git a/lib/rbcodec/codecs/hes.c b/lib/rbcodec/codecs/hes.c index 56f49621c6..59e5c07df0 100644 --- a/lib/rbcodec/codecs/hes.c +++ b/lib/rbcodec/codecs/hes.c | |||
@@ -86,7 +86,7 @@ next_track: | |||
86 | 86 | ||
87 | /* The main decoder loop */ | 87 | /* The main decoder loop */ |
88 | while ( 1 ) { | 88 | while ( 1 ) { |
89 | enum codec_command_action action = ci->get_command(¶m); | 89 | long action = ci->get_command(¶m); |
90 | 90 | ||
91 | if (action == CODEC_ACTION_HALT) | 91 | if (action == CODEC_ACTION_HALT) |
92 | break; | 92 | break; |
diff --git a/lib/rbcodec/codecs/kss.c b/lib/rbcodec/codecs/kss.c index e6cf866cdd..bd5124d2f4 100644 --- a/lib/rbcodec/codecs/kss.c +++ b/lib/rbcodec/codecs/kss.c | |||
@@ -89,7 +89,7 @@ next_track: | |||
89 | 89 | ||
90 | /* The main decoder loop */ | 90 | /* The main decoder loop */ |
91 | while (1) { | 91 | while (1) { |
92 | enum codec_command_action action = ci->get_command(¶m); | 92 | long action = ci->get_command(¶m); |
93 | 93 | ||
94 | if (action == CODEC_ACTION_HALT) | 94 | if (action == CODEC_ACTION_HALT) |
95 | break; | 95 | break; |
diff --git a/lib/rbcodec/codecs/mod.c b/lib/rbcodec/codecs/mod.c index 3d5f729235..d0d7e1d996 100644 --- a/lib/rbcodec/codecs/mod.c +++ b/lib/rbcodec/codecs/mod.c | |||
@@ -1333,7 +1333,7 @@ enum codec_status codec_run(void) | |||
1333 | old_patterntableposition = 0; | 1333 | old_patterntableposition = 0; |
1334 | 1334 | ||
1335 | while (1) { | 1335 | while (1) { |
1336 | enum codec_command_action action = ci->get_command(¶m); | 1336 | long action = ci->get_command(¶m); |
1337 | 1337 | ||
1338 | if (action == CODEC_ACTION_HALT) | 1338 | if (action == CODEC_ACTION_HALT) |
1339 | break; | 1339 | break; |
diff --git a/lib/rbcodec/codecs/mp3_enc.c b/lib/rbcodec/codecs/mp3_enc.c index 030eda846e..fecffc516f 100644 --- a/lib/rbcodec/codecs/mp3_enc.c +++ b/lib/rbcodec/codecs/mp3_enc.c | |||
@@ -2961,7 +2961,7 @@ enum codec_status codec_run(void) | |||
2961 | while (1) | 2961 | while (1) |
2962 | { | 2962 | { |
2963 | intptr_t param; | 2963 | intptr_t param; |
2964 | enum codec_command_action action = ci->get_command(¶m); | 2964 | long action = ci->get_command(¶m); |
2965 | 2965 | ||
2966 | if (action != CODEC_ACTION_NULL) | 2966 | if (action != CODEC_ACTION_NULL) |
2967 | { | 2967 | { |
diff --git a/lib/rbcodec/codecs/mpa.c b/lib/rbcodec/codecs/mpa.c index ca12087e87..0e7b4faf4f 100644 --- a/lib/rbcodec/codecs/mpa.c +++ b/lib/rbcodec/codecs/mpa.c | |||
@@ -392,7 +392,7 @@ enum codec_status codec_run(void) | |||
392 | 392 | ||
393 | /* This is the decoding loop. */ | 393 | /* This is the decoding loop. */ |
394 | while (1) { | 394 | while (1) { |
395 | enum codec_command_action action = ci->get_command(¶m); | 395 | long action = ci->get_command(¶m); |
396 | 396 | ||
397 | if (action == CODEC_ACTION_HALT) | 397 | if (action == CODEC_ACTION_HALT) |
398 | break; | 398 | break; |
diff --git a/lib/rbcodec/codecs/mpc.c b/lib/rbcodec/codecs/mpc.c index 79f2aa22db..a856f6f3d1 100644 --- a/lib/rbcodec/codecs/mpc.c +++ b/lib/rbcodec/codecs/mpc.c | |||
@@ -148,7 +148,7 @@ enum codec_status codec_run(void) | |||
148 | /* This is the decoding loop. */ | 148 | /* This is the decoding loop. */ |
149 | do | 149 | do |
150 | { | 150 | { |
151 | enum codec_command_action action = ci->get_command(¶m); | 151 | long action = ci->get_command(¶m); |
152 | 152 | ||
153 | if (action == CODEC_ACTION_HALT) | 153 | if (action == CODEC_ACTION_HALT) |
154 | return CODEC_OK; | 154 | return CODEC_OK; |
diff --git a/lib/rbcodec/codecs/nsf.c b/lib/rbcodec/codecs/nsf.c index cbdf8e3ec5..61035dbd3f 100644 --- a/lib/rbcodec/codecs/nsf.c +++ b/lib/rbcodec/codecs/nsf.c | |||
@@ -95,7 +95,7 @@ next_track: | |||
95 | 95 | ||
96 | /* The main decoder loop */ | 96 | /* The main decoder loop */ |
97 | while (1) { | 97 | while (1) { |
98 | enum codec_command_action action = ci->get_command(¶m); | 98 | long action = ci->get_command(¶m); |
99 | 99 | ||
100 | if (action == CODEC_ACTION_HALT) | 100 | if (action == CODEC_ACTION_HALT) |
101 | break; | 101 | break; |
diff --git a/lib/rbcodec/codecs/opus.c b/lib/rbcodec/codecs/opus.c index 058880c149..1ce7f19dfd 100644 --- a/lib/rbcodec/codecs/opus.c +++ b/lib/rbcodec/codecs/opus.c | |||
@@ -314,7 +314,7 @@ enum codec_status codec_main(enum codec_entry_call_reason reason) | |||
314 | enum codec_status codec_run(void) | 314 | enum codec_status codec_run(void) |
315 | { | 315 | { |
316 | int error = CODEC_ERROR; | 316 | int error = CODEC_ERROR; |
317 | enum codec_command_action action; | 317 | long action; |
318 | intptr_t param; | 318 | intptr_t param; |
319 | ogg_sync_state oy; | 319 | ogg_sync_state oy; |
320 | ogg_page og; | 320 | ogg_page og; |
diff --git a/lib/rbcodec/codecs/raac.c b/lib/rbcodec/codecs/raac.c index d2d3531028..e77d432680 100644 --- a/lib/rbcodec/codecs/raac.c +++ b/lib/rbcodec/codecs/raac.c | |||
@@ -63,7 +63,7 @@ enum codec_status codec_run(void) | |||
63 | unsigned char c = 0; /* channels */ | 63 | unsigned char c = 0; /* channels */ |
64 | int playback_on = -1; | 64 | int playback_on = -1; |
65 | size_t resume_offset; | 65 | size_t resume_offset; |
66 | enum codec_command_action action; | 66 | long action; |
67 | intptr_t param; | 67 | intptr_t param; |
68 | 68 | ||
69 | if (codec_init()) { | 69 | if (codec_init()) { |
diff --git a/lib/rbcodec/codecs/sgc.c b/lib/rbcodec/codecs/sgc.c index eb260975c5..e8927f16a6 100644 --- a/lib/rbcodec/codecs/sgc.c +++ b/lib/rbcodec/codecs/sgc.c | |||
@@ -101,7 +101,7 @@ next_track: | |||
101 | 101 | ||
102 | /* The main decoder loop */ | 102 | /* The main decoder loop */ |
103 | while (1) { | 103 | while (1) { |
104 | enum codec_command_action action = ci->get_command(¶m); | 104 | long action = ci->get_command(¶m); |
105 | 105 | ||
106 | if (action == CODEC_ACTION_HALT) | 106 | if (action == CODEC_ACTION_HALT) |
107 | break; | 107 | break; |
diff --git a/lib/rbcodec/codecs/shorten.c b/lib/rbcodec/codecs/shorten.c index aa4acdad4a..f171b69a64 100644 --- a/lib/rbcodec/codecs/shorten.c +++ b/lib/rbcodec/codecs/shorten.c | |||
@@ -110,7 +110,7 @@ seek_start: | |||
110 | samplesdone = 0; | 110 | samplesdone = 0; |
111 | buf = ci->request_buffer(&bytesleft, MAX_BUFFER_SIZE); | 111 | buf = ci->request_buffer(&bytesleft, MAX_BUFFER_SIZE); |
112 | while (bytesleft) { | 112 | while (bytesleft) { |
113 | enum codec_command_action action = ci->get_command(¶m); | 113 | long action = ci->get_command(¶m); |
114 | 114 | ||
115 | if (action == CODEC_ACTION_HALT) | 115 | if (action == CODEC_ACTION_HALT) |
116 | break; | 116 | break; |
diff --git a/lib/rbcodec/codecs/sid.c b/lib/rbcodec/codecs/sid.c index 3c370961c7..9811745310 100644 --- a/lib/rbcodec/codecs/sid.c +++ b/lib/rbcodec/codecs/sid.c | |||
@@ -1277,7 +1277,7 @@ enum codec_status codec_run(void) | |||
1277 | 1277 | ||
1278 | /* The main decoder loop */ | 1278 | /* The main decoder loop */ |
1279 | while (1) { | 1279 | while (1) { |
1280 | enum codec_command_action action = ci->get_command(¶m); | 1280 | long action = ci->get_command(¶m); |
1281 | 1281 | ||
1282 | if (action == CODEC_ACTION_HALT) | 1282 | if (action == CODEC_ACTION_HALT) |
1283 | break; | 1283 | break; |
diff --git a/lib/rbcodec/codecs/smaf.c b/lib/rbcodec/codecs/smaf.c index eed9d39db4..5da8eb9aff 100644 --- a/lib/rbcodec/codecs/smaf.c +++ b/lib/rbcodec/codecs/smaf.c | |||
@@ -446,7 +446,7 @@ enum codec_status codec_run(void) | |||
446 | endofstream = 0; | 446 | endofstream = 0; |
447 | 447 | ||
448 | while (!endofstream) { | 448 | while (!endofstream) { |
449 | enum codec_command_action action = ci->get_command(¶m); | 449 | long action = ci->get_command(¶m); |
450 | 450 | ||
451 | if (action == CODEC_ACTION_HALT) | 451 | if (action == CODEC_ACTION_HALT) |
452 | break; | 452 | break; |
diff --git a/lib/rbcodec/codecs/spc.c b/lib/rbcodec/codecs/spc.c index 809562e2a0..dbec407d6a 100644 --- a/lib/rbcodec/codecs/spc.c +++ b/lib/rbcodec/codecs/spc.c | |||
@@ -453,7 +453,7 @@ static int play_track( void ) | |||
453 | 453 | ||
454 | while ( 1 ) | 454 | while ( 1 ) |
455 | { | 455 | { |
456 | enum codec_command_action action = ci->get_command(¶m); | 456 | long action = ci->get_command(¶m); |
457 | 457 | ||
458 | if (action == CODEC_ACTION_HALT) | 458 | if (action == CODEC_ACTION_HALT) |
459 | break; | 459 | break; |
diff --git a/lib/rbcodec/codecs/speex.c b/lib/rbcodec/codecs/speex.c index a073151ee2..e1be971096 100644 --- a/lib/rbcodec/codecs/speex.c +++ b/lib/rbcodec/codecs/speex.c | |||
@@ -405,7 +405,7 @@ enum codec_status codec_run(void) | |||
405 | unsigned long strtoffset; | 405 | unsigned long strtoffset; |
406 | void *st = NULL; | 406 | void *st = NULL; |
407 | int j = 0; | 407 | int j = 0; |
408 | enum codec_command_action action; | 408 | long action; |
409 | intptr_t param; | 409 | intptr_t param; |
410 | 410 | ||
411 | memset(&bits, 0, sizeof(bits)); | 411 | memset(&bits, 0, sizeof(bits)); |
diff --git a/lib/rbcodec/codecs/tta.c b/lib/rbcodec/codecs/tta.c index b7660a920f..60481c9f28 100644 --- a/lib/rbcodec/codecs/tta.c +++ b/lib/rbcodec/codecs/tta.c | |||
@@ -104,7 +104,7 @@ enum codec_status codec_run(void) | |||
104 | 104 | ||
105 | while (!endofstream) | 105 | while (!endofstream) |
106 | { | 106 | { |
107 | enum codec_command_action action = ci->get_command(¶m); | 107 | long action = ci->get_command(¶m); |
108 | 108 | ||
109 | if (action == CODEC_ACTION_HALT) | 109 | if (action == CODEC_ACTION_HALT) |
110 | break; | 110 | break; |
diff --git a/lib/rbcodec/codecs/vgm.c b/lib/rbcodec/codecs/vgm.c index 126305944f..e8328d3b79 100644 --- a/lib/rbcodec/codecs/vgm.c +++ b/lib/rbcodec/codecs/vgm.c | |||
@@ -135,7 +135,7 @@ enum codec_status codec_run(void) | |||
135 | 135 | ||
136 | /* The main decoder loop */ | 136 | /* The main decoder loop */ |
137 | while (1) { | 137 | while (1) { |
138 | enum codec_command_action action = ci->get_command(¶m); | 138 | long action = ci->get_command(¶m); |
139 | 139 | ||
140 | if (action == CODEC_ACTION_HALT) | 140 | if (action == CODEC_ACTION_HALT) |
141 | break; | 141 | break; |
diff --git a/lib/rbcodec/codecs/vorbis.c b/lib/rbcodec/codecs/vorbis.c index a1ef68b6ba..83c9d5b31d 100644 --- a/lib/rbcodec/codecs/vorbis.c +++ b/lib/rbcodec/codecs/vorbis.c | |||
@@ -206,7 +206,7 @@ enum codec_status codec_run(void) | |||
206 | previous_section = -1; | 206 | previous_section = -1; |
207 | 207 | ||
208 | while (1) { | 208 | while (1) { |
209 | enum codec_command_action action = ci->get_command(¶m); | 209 | long action = ci->get_command(¶m); |
210 | 210 | ||
211 | if (action == CODEC_ACTION_HALT) | 211 | if (action == CODEC_ACTION_HALT) |
212 | break; | 212 | break; |
diff --git a/lib/rbcodec/codecs/vox.c b/lib/rbcodec/codecs/vox.c index 69eafc72ff..5ce2a0fb58 100644 --- a/lib/rbcodec/codecs/vox.c +++ b/lib/rbcodec/codecs/vox.c | |||
@@ -159,7 +159,7 @@ enum codec_status codec_run(void) | |||
159 | endofstream = 0; | 159 | endofstream = 0; |
160 | 160 | ||
161 | while (!endofstream) { | 161 | while (!endofstream) { |
162 | enum codec_command_action action = ci->get_command(¶m); | 162 | long action = ci->get_command(¶m); |
163 | 163 | ||
164 | if (action == CODEC_ACTION_HALT) | 164 | if (action == CODEC_ACTION_HALT) |
165 | break; | 165 | break; |
diff --git a/lib/rbcodec/codecs/wav.c b/lib/rbcodec/codecs/wav.c index 0441be78b8..445d3e8dde 100644 --- a/lib/rbcodec/codecs/wav.c +++ b/lib/rbcodec/codecs/wav.c | |||
@@ -396,7 +396,7 @@ enum codec_status codec_run(void) | |||
396 | endofstream = 0; | 396 | endofstream = 0; |
397 | 397 | ||
398 | while (!endofstream) { | 398 | while (!endofstream) { |
399 | enum codec_command_action action = ci->get_command(¶m); | 399 | long action = ci->get_command(¶m); |
400 | 400 | ||
401 | if (action == CODEC_ACTION_HALT) | 401 | if (action == CODEC_ACTION_HALT) |
402 | break; | 402 | break; |
diff --git a/lib/rbcodec/codecs/wav64.c b/lib/rbcodec/codecs/wav64.c index a74c932e0e..198e7c79e3 100644 --- a/lib/rbcodec/codecs/wav64.c +++ b/lib/rbcodec/codecs/wav64.c | |||
@@ -400,7 +400,7 @@ enum codec_status codec_run(void) | |||
400 | endofstream = 0; | 400 | endofstream = 0; |
401 | 401 | ||
402 | while (!endofstream) { | 402 | while (!endofstream) { |
403 | enum codec_command_action action = ci->get_command(¶m); | 403 | long action = ci->get_command(¶m); |
404 | 404 | ||
405 | if (action == CODEC_ACTION_HALT) | 405 | if (action == CODEC_ACTION_HALT) |
406 | break; | 406 | break; |
diff --git a/lib/rbcodec/codecs/wav_enc.c b/lib/rbcodec/codecs/wav_enc.c index 93bb9aa8ac..0f56eb836c 100644 --- a/lib/rbcodec/codecs/wav_enc.c +++ b/lib/rbcodec/codecs/wav_enc.c | |||
@@ -188,7 +188,7 @@ enum codec_status ICODE_ATTR codec_run(void) | |||
188 | /* main encoding loop */ | 188 | /* main encoding loop */ |
189 | while (1) | 189 | while (1) |
190 | { | 190 | { |
191 | enum codec_command_action action = ci->get_command(NULL); | 191 | long action = ci->get_command(NULL); |
192 | 192 | ||
193 | if (action != CODEC_ACTION_NULL) | 193 | if (action != CODEC_ACTION_NULL) |
194 | break; | 194 | break; |
diff --git a/lib/rbcodec/codecs/wavpack.c b/lib/rbcodec/codecs/wavpack.c index d9c294397c..71ff88e2ea 100644 --- a/lib/rbcodec/codecs/wavpack.c +++ b/lib/rbcodec/codecs/wavpack.c | |||
@@ -90,7 +90,7 @@ enum codec_status codec_run(void) | |||
90 | 90 | ||
91 | while (1) { | 91 | while (1) { |
92 | int32_t nsamples; | 92 | int32_t nsamples; |
93 | enum codec_command_action action = ci->get_command(¶m); | 93 | long action = ci->get_command(¶m); |
94 | 94 | ||
95 | if (action == CODEC_ACTION_HALT) | 95 | if (action == CODEC_ACTION_HALT) |
96 | break; | 96 | break; |
diff --git a/lib/rbcodec/codecs/wavpack_enc.c b/lib/rbcodec/codecs/wavpack_enc.c index ffb090f6ec..bdd999b14a 100644 --- a/lib/rbcodec/codecs/wavpack_enc.c +++ b/lib/rbcodec/codecs/wavpack_enc.c | |||
@@ -353,7 +353,7 @@ enum codec_status codec_run(void) | |||
353 | /* main encoding loop */ | 353 | /* main encoding loop */ |
354 | while (1) | 354 | while (1) |
355 | { | 355 | { |
356 | enum codec_command_action action = ci->get_command(NULL); | 356 | long action = ci->get_command(NULL); |
357 | 357 | ||
358 | if (action != CODEC_ACTION_NULL) | 358 | if (action != CODEC_ACTION_NULL) |
359 | break; | 359 | break; |
diff --git a/lib/rbcodec/codecs/wma.c b/lib/rbcodec/codecs/wma.c index 9a5e0c71fa..7583846929 100755..100644 --- a/lib/rbcodec/codecs/wma.c +++ b/lib/rbcodec/codecs/wma.c | |||
@@ -52,7 +52,7 @@ enum codec_status codec_run(void) | |||
52 | int audiobufsize; | 52 | int audiobufsize; |
53 | int packetlength = 0; | 53 | int packetlength = 0; |
54 | int errcount = 0; | 54 | int errcount = 0; |
55 | enum codec_command_action action; | 55 | long action; |
56 | intptr_t param; | 56 | intptr_t param; |
57 | 57 | ||
58 | /* Remember the resume position - when the codec is opened, the | 58 | /* Remember the resume position - when the codec is opened, the |
diff --git a/lib/rbcodec/codecs/wmapro.c b/lib/rbcodec/codecs/wmapro.c index 540140b1e2..f874db25f9 100644 --- a/lib/rbcodec/codecs/wmapro.c +++ b/lib/rbcodec/codecs/wmapro.c | |||
@@ -93,7 +93,7 @@ restart_track: | |||
93 | 93 | ||
94 | while (pktcnt < wfx.numpackets) | 94 | while (pktcnt < wfx.numpackets) |
95 | { | 95 | { |
96 | enum codec_command_action action = ci->get_command(¶m); | 96 | long action = ci->get_command(¶m); |
97 | 97 | ||
98 | if (action == CODEC_ACTION_HALT) | 98 | if (action == CODEC_ACTION_HALT) |
99 | break; | 99 | break; |
diff --git a/lib/rbcodec/codecs/wmavoice.c b/lib/rbcodec/codecs/wmavoice.c index 4c89c6dc96..2c37da8734 100644 --- a/lib/rbcodec/codecs/wmavoice.c +++ b/lib/rbcodec/codecs/wmavoice.c | |||
@@ -120,7 +120,7 @@ restart_track: | |||
120 | 120 | ||
121 | while (pktcnt < wfx.numpackets) | 121 | while (pktcnt < wfx.numpackets) |
122 | { | 122 | { |
123 | enum codec_command_action action = ci->get_command(¶m); | 123 | long action = ci->get_command(¶m); |
124 | 124 | ||
125 | if (action == CODEC_ACTION_HALT) | 125 | if (action == CODEC_ACTION_HALT) |
126 | break; | 126 | break; |
diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c index a203d6f1da..cb7a85ff25 100644 --- a/lib/rbcodec/test/warble.c +++ b/lib/rbcodec/test/warble.c | |||
@@ -108,7 +108,7 @@ static const char *config = ""; | |||
108 | static uint32_t playback_vol_factor = VOL_FACTOR_UNITY; | 108 | static uint32_t playback_vol_factor = VOL_FACTOR_UNITY; |
109 | 109 | ||
110 | static int input_fd; | 110 | static int input_fd; |
111 | static enum codec_command_action codec_action; | 111 | static long codec_action; |
112 | static intptr_t codec_action_param = 0; | 112 | static intptr_t codec_action_param = 0; |
113 | static unsigned long num_output_samples = 0; | 113 | static unsigned long num_output_samples = 0; |
114 | static struct codec_api ci; | 114 | static struct codec_api ci; |
@@ -606,9 +606,9 @@ static void ci_configure(int setting, intptr_t value) | |||
606 | } | 606 | } |
607 | } | 607 | } |
608 | 608 | ||
609 | static enum codec_command_action ci_get_command(intptr_t *param) | 609 | static long ci_get_command(intptr_t *param) |
610 | { | 610 | { |
611 | enum codec_command_action ret = codec_action; | 611 | long ret = codec_action; |
612 | *param = codec_action_param; | 612 | *param = codec_action_param; |
613 | codec_action = CODEC_ACTION_NULL; | 613 | codec_action = CODEC_ACTION_NULL; |
614 | return ret; | 614 | return ret; |