From 51189b4cb41fb70f4800286f99573f590941ddea Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 6 Dec 2006 08:34:55 +0000 Subject: Small change to PCM recording API for low latency effects. Latency can be as low as 14 samples from input to output including the FIFOs (ColdFire) but 16 is more reasonable an expectation if only tranferring one sample per interrupt (\!). May convert PCM playback to use the same method as it can still be used in the old manner with some slight mods but has the potential to enable new features since it is more flexible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11668 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 1 + apps/plugin.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/plugin.c b/apps/plugin.c index 268fee5..b129493 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -482,6 +482,7 @@ static const struct plugin_api rockbox_api = { #if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) && !defined(SIMULATOR) sound_default, + pcm_record_more, #endif }; diff --git a/apps/plugin.h b/apps/plugin.h index 22f6b97..68841e8 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -580,8 +580,8 @@ struct plugin_api { #ifndef SIMULATOR void (*pcm_init_recording)(void); void (*pcm_close_recording)(void); - void (*pcm_record_data)(pcm_more_callback_type more_ready, - unsigned char *start, size_t size); + void (*pcm_record_data)(pcm_more_callback_type2 more_ready, + 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); @@ -598,6 +598,7 @@ struct plugin_api { #if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) && !defined(SIMULATOR) int (*sound_default)(int setting); + void (*pcm_record_more)(void *start, size_t size); #endif }; -- cgit v1.1