diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2005-08-20 11:13:19 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-08-20 11:13:19 +0000 |
commit | 159c52dd36e5c008612458192904f57ea6dfdfad (patch) | |
tree | 4b6f7d8329069e90d72284ef73ba542d75705b55 /apps/codecs.c | |
parent | 329caa8ade0b78a3235e9d28983cb1c506e573a0 (diff) | |
download | rockbox-159c52dd36e5c008612458192904f57ea6dfdfad.tar.gz rockbox-159c52dd36e5c008612458192904f57ea6dfdfad.zip |
Initial voice ui support for software codec platforms. Added also a
beep when changing tracks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7360 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.c')
-rw-r--r-- | apps/codecs.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/codecs.c b/apps/codecs.c index b1d30868bc..004d4681f7 100644 --- a/apps/codecs.c +++ b/apps/codecs.c | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | #ifdef SIMULATOR | 55 | #ifdef SIMULATOR |
56 | #if CONFIG_HWCODEC == MASNONE | 56 | #if CONFIG_HWCODEC == MASNONE |
57 | static unsigned char codecbuf[CODEC_SIZE]; | 57 | unsigned char codecbuf[CODEC_SIZE]; |
58 | #endif | 58 | #endif |
59 | void *sim_codec_load_ram(char* codecptr, int size, | 59 | void *sim_codec_load_ram(char* codecptr, int size, |
60 | void* ptr2, int bufwrap, int *pd); | 60 | void* ptr2, int bufwrap, int *pd); |
@@ -68,6 +68,8 @@ extern void* plugin_get_audio_buffer(int *buffer_size); | |||
68 | 68 | ||
69 | static int codec_test(int api_version, int model, int memsize); | 69 | static int codec_test(int api_version, int model, int memsize); |
70 | 70 | ||
71 | struct codec_api ci_voice; | ||
72 | |||
71 | struct codec_api ci = { | 73 | struct codec_api ci = { |
72 | CODEC_API_VERSION, | 74 | CODEC_API_VERSION, |
73 | codec_test, | 75 | codec_test, |
@@ -247,7 +249,8 @@ struct codec_api ci = { | |||
247 | NULL, | 249 | NULL, |
248 | }; | 250 | }; |
249 | 251 | ||
250 | int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap) | 252 | int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap, |
253 | struct codec_api *api) | ||
251 | { | 254 | { |
252 | enum codec_status (*codec_start)(const struct codec_api* api); | 255 | enum codec_status (*codec_start)(const struct codec_api* api); |
253 | int status; | 256 | int status; |
@@ -277,7 +280,7 @@ int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap) | |||
277 | #endif /* SIMULATOR */ | 280 | #endif /* SIMULATOR */ |
278 | 281 | ||
279 | invalidate_icache(); | 282 | invalidate_icache(); |
280 | status = codec_start(&ci); | 283 | status = codec_start(api); |
281 | #ifdef SIMULATOR | 284 | #ifdef SIMULATOR |
282 | sim_codec_close(pd); | 285 | sim_codec_close(pd); |
283 | #endif | 286 | #endif |
@@ -285,7 +288,7 @@ int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap) | |||
285 | return status; | 288 | return status; |
286 | } | 289 | } |
287 | 290 | ||
288 | int codec_load_file(const char *plugin) | 291 | int codec_load_file(const char *plugin, struct codec_api *api) |
289 | { | 292 | { |
290 | char msgbuf[80]; | 293 | char msgbuf[80]; |
291 | int fd; | 294 | int fd; |
@@ -309,7 +312,7 @@ int codec_load_file(const char *plugin) | |||
309 | return CODEC_ERROR; | 312 | return CODEC_ERROR; |
310 | } | 313 | } |
311 | 314 | ||
312 | return codec_load_ram(codecbuf, (size_t)rc, NULL, 0); | 315 | return codec_load_ram(codecbuf, (size_t)rc, NULL, 0, api); |
313 | } | 316 | } |
314 | 317 | ||
315 | static int codec_test(int api_version, int model, int memsize) | 318 | static int codec_test(int api_version, int model, int memsize) |