diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-02-23 14:31:13 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-02-23 14:31:13 +0000 |
commit | 65109732230849eeb9eec2f56f9e046ad6b476c3 (patch) | |
tree | 51096b18d823cfb05575335b91e3d1eb75ca4e27 /apps/codec_thread.h | |
parent | 43b38b71f5944c1a29060847b58d7e79f7dfe428 (diff) | |
download | rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.gz rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.zip |
Give playback engine better control over the codec. Codec simply follows commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codec_thread.h')
-rw-r--r-- | apps/codec_thread.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/codec_thread.h b/apps/codec_thread.h index a849e07d39..7056e2cdf5 100644 --- a/apps/codec_thread.h +++ b/apps/codec_thread.h | |||
@@ -24,11 +24,30 @@ | |||
24 | 24 | ||
25 | #include <stdbool.h> | 25 | #include <stdbool.h> |
26 | 26 | ||
27 | /* codec identity */ | ||
27 | int get_codec_base_type(int type); | 28 | int get_codec_base_type(int type); |
28 | const char *get_codec_filename(int cod_spec); | 29 | const char *get_codec_filename(int cod_spec); |
30 | |||
31 | /* codec thread */ | ||
32 | |||
33 | /* Audio MUST be stopped before requesting callback! */ | ||
29 | void codec_thread_do_callback(void (*fn)(void), | 34 | void codec_thread_do_callback(void (*fn)(void), |
30 | unsigned int *codec_thread_id); | 35 | unsigned int *codec_thread_id); |
36 | |||
31 | void codec_init_codec_api(void); | 37 | void codec_init_codec_api(void); |
32 | void make_codec_thread(void); | 38 | void make_codec_thread(void); |
33 | 39 | void codec_thread_resume(void); | |
40 | bool is_codec_thread(void); | ||
41 | #ifdef HAVE_PRIORITY_SCHEDULING | ||
42 | int codec_thread_get_priority(void); | ||
43 | int codec_thread_set_priority(int priority); | ||
34 | #endif | 44 | #endif |
45 | |||
46 | /* codec commands - on audio thread only! */ | ||
47 | intptr_t codec_ack_msg(intptr_t data, bool stop_codec); | ||
48 | bool codec_load(int hid, int cod_spec); | ||
49 | void codec_stop(void); | ||
50 | int codec_loaded(void); | ||
51 | /* */ | ||
52 | |||
53 | #endif /* _CODEC_THREAD_H */ | ||