summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h47
1 files changed, 35 insertions, 12 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 54d2702017..bfb02b9e67 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -29,47 +29,49 @@
29#define MEM 2 29#define MEM 2
30#endif 30#endif
31 31
32#include <stdarg.h>
33#include <stdbool.h> 32#include <stdbool.h>
33#include <sys/types.h>
34#include <stdarg.h>
34#include <stdio.h> 35#include <stdio.h>
35#include <stdlib.h> 36#include <stdlib.h>
36#include <sys/types.h>
37#include "config.h" 37#include "config.h"
38#include "system.h"
38#include "dir.h" 39#include "dir.h"
39#include "kernel.h" 40#include "kernel.h"
41#include "thread.h"
40#include "button.h" 42#include "button.h"
41#include "action.h" 43#include "action.h"
42#include "usb.h" 44#include "usb.h"
43#include "font.h" 45#include "font.h"
44#include "system.h"
45#include "lcd.h" 46#include "lcd.h"
46#include "id3.h" 47#include "id3.h"
48#include "sound.h"
47#include "mpeg.h" 49#include "mpeg.h"
48#include "audio.h" 50#include "audio.h"
49#include "mp3_playback.h" 51#include "mp3_playback.h"
50#include "tree.h" 52#include "talk.h"
51#ifdef RB_PROFILE 53#ifdef RB_PROFILE
52#include "profile.h" 54#include "profile.h"
53#endif 55#endif
54#include "misc.h" 56#include "misc.h"
55#if (CONFIG_CODEC == SWCODEC) 57#if (CONFIG_CODEC == SWCODEC)
56#include "pcm_playback.h"
57#include "dsp.h" 58#include "dsp.h"
59#ifdef HAVE_RECORDING
60#include "recording.h"
61#endif
58#else 62#else
59#include "mas.h" 63#include "mas.h"
60#endif 64#endif /* CONFIG_CODEC == SWCODEC */
61#include "settings.h" 65#include "settings.h"
62#include "timer.h" 66#include "timer.h"
63#include "thread.h"
64#include "playlist.h" 67#include "playlist.h"
65#ifdef HAVE_LCD_BITMAP 68#ifdef HAVE_LCD_BITMAP
66#include "widgets.h" 69#include "widgets.h"
67#endif 70#endif
68#include "sound.h"
69#include "menu.h" 71#include "menu.h"
70#include "rbunicode.h" 72#include "rbunicode.h"
71#include "list.h" 73#include "list.h"
72#include "talk.h" 74#include "tree.h"
73 75
74#ifdef HAVE_REMOTE_LCD 76#ifdef HAVE_REMOTE_LCD
75#include "lcd-remote.h" 77#include "lcd-remote.h"
@@ -105,7 +107,7 @@
105#define PLUGIN_MAGIC 0x526F634B /* RocK */ 107#define PLUGIN_MAGIC 0x526F634B /* RocK */
106 108
107/* increase this every time the api struct changes */ 109/* increase this every time the api struct changes */
108#define PLUGIN_API_VERSION 34 110#define PLUGIN_API_VERSION 35
109 111
110/* update this to latest version if a change to the api struct breaks 112/* update this to latest version if a change to the api struct breaks
111 backwards compatibility (and please take the opportunity to sort in any 113 backwards compatibility (and please take the opportunity to sort in any
@@ -405,7 +407,7 @@ struct plugin_api {
405 void (*bitswap)(unsigned char *data, int length); 407 void (*bitswap)(unsigned char *data, int length);
406#endif 408#endif
407#if CONFIG_CODEC == SWCODEC 409#if CONFIG_CODEC == SWCODEC
408 void (*pcm_play_data)(void (*get_more)(unsigned char** start, size_t*size), 410 void (*pcm_play_data)(pcm_more_callback_type get_more,
409 unsigned char* start, size_t size); 411 unsigned char* start, size_t size);
410 void (*pcm_play_stop)(void); 412 void (*pcm_play_stop)(void);
411 void (*pcm_set_frequency)(unsigned int frequency); 413 void (*pcm_set_frequency)(unsigned int frequency);
@@ -554,7 +556,28 @@ struct plugin_api {
554 /* new stuff at the end, sort into place next time 556 /* new stuff at the end, sort into place next time
555 the API gets incompatible */ 557 the API gets incompatible */
556 558
557 559/* Keep these at the bottom till fully proven */
560#if CONFIG_CODEC == SWCODEC
561 const unsigned long *audio_master_sampr_list;
562 const unsigned long *hw_freq_sampr;
563#ifndef SIMULATOR
564 void (*pcm_apply_settings)(bool reset);
565#endif
566#ifdef HAVE_RECORDING
567 const unsigned long *rec_freq_sampr;
568#ifndef SIMULATOR
569 void (*pcm_set_monitor)(int monitor);
570 void (*pcm_set_rec_source)(int source);
571 void (*pcm_init_recording)(void);
572 void (*pcm_close_recording)(void);
573 void (*pcm_record_data)(pcm_more_callback_type more_ready,
574 unsigned char *start, size_t size);
575 void (*pcm_stop_recording)(void);
576 void (*pcm_calculate_rec_peaks)(int *left, int *right);
577 void (*rec_set_source)(int source, unsigned flags);
578#endif
579#endif /* HAVE_RECORDING */
580#endif /* CONFIG_CODEC == SWCODEC */
558}; 581};
559 582
560/* plugin header */ 583/* plugin header */