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.zip rockbox-159c52dd36e5c008612458192904f57ea6dfdfad.tar.gz rockbox-159c52dd36e5c008612458192904f57ea6dfdfad.tar.bz2 rockbox-159c52dd36e5c008612458192904f57ea6dfdfad.tar.xz | |
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 b1d3086..004d468 100644 --- a/apps/codecs.c +++ b/apps/codecs.c @@ -54,7 +54,7 @@ #ifdef SIMULATOR #if CONFIG_HWCODEC == MASNONE -static unsigned char codecbuf[CODEC_SIZE]; +unsigned char codecbuf[CODEC_SIZE]; #endif void *sim_codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap, int *pd); @@ -68,6 +68,8 @@ extern void* plugin_get_audio_buffer(int *buffer_size); static int codec_test(int api_version, int model, int memsize); +struct codec_api ci_voice; + struct codec_api ci = { CODEC_API_VERSION, codec_test, @@ -247,7 +249,8 @@ struct codec_api ci = { NULL, }; -int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap) +int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap, + struct codec_api *api) { enum codec_status (*codec_start)(const struct codec_api* api); int status; @@ -277,7 +280,7 @@ int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap) #endif /* SIMULATOR */ invalidate_icache(); - status = codec_start(&ci); + status = codec_start(api); #ifdef SIMULATOR sim_codec_close(pd); #endif @@ -285,7 +288,7 @@ int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap) return status; } -int codec_load_file(const char *plugin) +int codec_load_file(const char *plugin, struct codec_api *api) { char msgbuf[80]; int fd; @@ -309,7 +312,7 @@ int codec_load_file(const char *plugin) return CODEC_ERROR; } - return codec_load_ram(codecbuf, (size_t)rc, NULL, 0); + return codec_load_ram(codecbuf, (size_t)rc, NULL, 0, api); } static int codec_test(int api_version, int model, int memsize) |