summaryrefslogtreecommitdiff
path: root/apps/codecs.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs.h')
-rw-r--r--apps/codecs.h24
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 @@
46#include "profile.h" 46#include "profile.h"
47#endif 47#endif
48#if (CONFIG_CODEC == SWCODEC) 48#if (CONFIG_CODEC == SWCODEC)
49#if !defined(SIMULATOR)
50#include "pcm_record.h"
51#endif
49#include "dsp.h" 52#include "dsp.h"
50#include "playback.h" 53#include "playback.h"
51#endif 54#endif
@@ -84,7 +87,7 @@
84#define CODEC_MAGIC 0x52434F44 /* RCOD */ 87#define CODEC_MAGIC 0x52434F44 /* RCOD */
85 88
86/* increase this every time the api struct changes */ 89/* increase this every time the api struct changes */
87#define CODEC_API_VERSION 8 90#define CODEC_API_VERSION 9
88 91
89/* update this to latest version if a change to the api struct breaks 92/* update this to latest version if a change to the api struct breaks
90 backwards compatibility (and please take the opportunity to sort in any 93 backwards compatibility (and please take the opportunity to sort in any
@@ -284,6 +287,21 @@ struct codec_api {
284 void (*profile_func_enter)(void *this_fn, void *call_site); 287 void (*profile_func_enter)(void *this_fn, void *call_site);
285 void (*profile_func_exit)(void *this_fn, void *call_site); 288 void (*profile_func_exit)(void *this_fn, void *call_site);
286#endif 289#endif
290
291#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
292 bool enc_codec_loaded;
293 void (*enc_get_inputs)(int *buffer_size,
294 int *channels, int *quality);
295 void (*enc_set_parameters)(int chunk_size, int num_chunks,
296 int samp_per_chunk, char *head_ptr, int head_size,
297 int enc_id);
298 unsigned int* (*enc_alloc_chunk)(void);
299 void (*enc_free_chunk)(void);
300 int (*enc_wavbuf_near_empty)(void);
301 char* (*enc_get_wav_data)(int size);
302 void (**enc_set_header_callback)(void *head_buffer,
303 int head_size, int num_samples, bool is_file_header);
304#endif
287 305
288 /* new stuff at the end, sort into place next time 306 /* new stuff at the end, sort into place next time
289 the API gets incompatible */ 307 the API gets incompatible */
@@ -317,6 +335,10 @@ extern unsigned char plugin_end_addr[];
317#endif 335#endif
318#endif 336#endif
319 337
338/* create full codec path from filenames in audio_formats[]
339 assumes buffer size is MAX_PATH */
340void codec_get_full_path(char *path, const char *codec_fn);
341
320/* defined by the codec loader (codec.c) */ 342/* defined by the codec loader (codec.c) */
321int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap, 343int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap,
322 struct codec_api *api); 344 struct codec_api *api);