diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-24 16:42:32 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-24 16:42:32 +0000 |
| commit | d56999890f2aacf197d9ae4383313271499509a9 (patch) | |
| tree | 76a0177e2cf19bb15a065199b812ef20158422e1 /apps/plugin.h | |
| parent | 6688988ec42aa2254c8e370ec1932033a258b6fa (diff) | |
| download | rockbox-d56999890f2aacf197d9ae4383313271499509a9.zip rockbox-d56999890f2aacf197d9ae4383313271499509a9.tar.gz rockbox-d56999890f2aacf197d9ae4383313271499509a9.tar.bz2 rockbox-d56999890f2aacf197d9ae4383313271499509a9.tar.xz | |
Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
| -rw-r--r-- | apps/plugin.h | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 6727ca4..7e198c9 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -144,12 +144,12 @@ void* plugin_get_buffer(size_t *buffer_size); #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 186 +#define PLUGIN_API_VERSION 187 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any new function which are "waiting" at the end of the function table) */ -#define PLUGIN_MIN_API_VERSION 182 +#define PLUGIN_MIN_API_VERSION 187 /* plugin return codes */ enum plugin_status { @@ -259,6 +259,9 @@ struct plugin_api { struct event_queue *button_queue; #endif unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); +#ifdef HAVE_LCD_BITMAP + bool (*is_diacritic)(const unsigned short char_code, bool *is_rtl); +#endif const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); int (*font_load)(struct font*, const char *path); struct font* (*font_get)(int font); @@ -577,6 +580,10 @@ struct plugin_api { int (*sound_max)(int setting); const char * (*sound_unit)(int setting); int (*sound_val2phys)(int setting, int value); +#ifdef AUDIOHW_HAVE_EQ + int (*sound_enum_hw_eq_band_setting)(unsigned int band, + unsigned int band_setting); +#endif /* AUDIOHW_HAVE_EQ */ #ifndef SIMULATOR void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size)); @@ -591,7 +598,7 @@ struct plugin_api { const unsigned long *audio_master_sampr_list; const unsigned long *hw_freq_sampr; void (*pcm_apply_settings)(void); - void (*pcm_play_data)(pcm_more_callback_type get_more, + void (*pcm_play_data)(pcm_play_callback_type get_more, unsigned char* start, size_t size); void (*pcm_play_stop)(void); void (*pcm_set_frequency)(unsigned int frequency); @@ -610,9 +617,8 @@ struct plugin_api { const unsigned long *rec_freq_sampr; void (*pcm_init_recording)(void); void (*pcm_close_recording)(void); - void (*pcm_record_data)(pcm_more_callback_type2 more_ready, + void (*pcm_record_data)(pcm_rec_callback_type more_ready, void *start, size_t size); - void (*pcm_record_more)(void *start, size_t size); void (*pcm_stop_recording)(void); void (*pcm_calculate_rec_peaks)(int *left, int *right); void (*audio_set_recording_gain)(int left, int right, int type); @@ -774,7 +780,15 @@ struct plugin_api { unsigned int *audio_thread_id); int (*codec_load_file)(const char* codec, struct codec_api *api); const char *(*get_codec_filename)(int cod_spec); + void ** (*find_array_ptr)(void **arr, void *ptr); + int (*remove_array_ptr)(void **arr, void *ptr); +#if defined(HAVE_RECORDING) && (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN)) +int (*round_value_to_list32)(unsigned long value, + const unsigned long list[], + int count, + bool signd); #endif +#endif /* CONFIG_CODEC == SWCODEC */ bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname); bool (*mp3info)(struct mp3entry *entry, const char *filename); int (*count_mp3_frames)(int fd, int startpos, int filesize, @@ -874,28 +888,6 @@ struct plugin_api { const char *appsversion; /* new stuff at the end, sort into place next time the API gets incompatible */ - -#ifdef HAVE_LCD_BITMAP - bool (*is_diacritic)(const unsigned short char_code, bool *is_rtl); -#endif - -#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && \ - (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN)) -int (*round_value_to_list32)(unsigned long value, - const unsigned long list[], - int count, - bool signd); -#endif - -#ifdef AUDIOHW_HAVE_EQ - int (*sound_enum_hw_eq_band_setting)(unsigned int band, - unsigned int band_setting); -#endif /* AUDIOHW_HAVE_EQ */ - -#if CONFIG_CODEC == SWCODEC - void ** (*find_array_ptr)(void **arr, void *ptr); - int (*remove_array_ptr)(void **arr, void *ptr); -#endif }; /* plugin header */ |