diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-08-28 22:38:41 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-08-28 22:38:41 +0000 |
commit | 4fc717a4c19a1fe0349977d7b9c86561c5a5cf2d (patch) | |
tree | eb6113c7491072f7b5136e24775737764e2cdede /apps/codecs.h | |
parent | 65c2c58b3aa26164bd919665e4d710efa2fa7c79 (diff) |
Added FS#2939 Encoder Codec Interface + Codecs by Antonius Hellmann with additional FM Recording support and my modifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10789 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.h')
-rw-r--r-- | apps/codecs.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/apps/codecs.h b/apps/codecs.h index 9ef67c4948..dde376d73c 100644 --- a/apps/codecs.h +++ b/apps/codecs.h @@ -46,6 +46,9 @@ #include "profile.h" #endif #if (CONFIG_CODEC == SWCODEC) +#if !defined(SIMULATOR) +#include "pcm_record.h" +#endif #include "dsp.h" #include "playback.h" #endif @@ -84,7 +87,7 @@ #define CODEC_MAGIC 0x52434F44 /* RCOD */ /* increase this every time the api struct changes */ -#define CODEC_API_VERSION 8 +#define CODEC_API_VERSION 9 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any @@ -284,6 +287,21 @@ struct codec_api { void (*profile_func_enter)(void *this_fn, void *call_site); void (*profile_func_exit)(void *this_fn, void *call_site); #endif + +#if defined(HAVE_RECORDING) && !defined(SIMULATOR) + bool enc_codec_loaded; + void (*enc_get_inputs)(int *buffer_size, + int *channels, int *quality); + void (*enc_set_parameters)(int chunk_size, int num_chunks, + int samp_per_chunk, char *head_ptr, int head_size, + int enc_id); + unsigned int* (*enc_alloc_chunk)(void); + void (*enc_free_chunk)(void); + int (*enc_wavbuf_near_empty)(void); + char* (*enc_get_wav_data)(int size); + void (**enc_set_header_callback)(void *head_buffer, + int head_size, int num_samples, bool is_file_header); +#endif /* new stuff at the end, sort into place next time the API gets incompatible */ @@ -317,6 +335,10 @@ extern unsigned char plugin_end_addr[]; #endif #endif +/* create full codec path from filenames in audio_formats[] + assumes buffer size is MAX_PATH */ +void codec_get_full_path(char *path, const char *codec_fn); + /* defined by the codec loader (codec.c) */ int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap, struct codec_api *api); |