summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-06-29 06:37:04 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-06-29 06:37:04 +0000
commita2b6703a369f6cdbfec1f150c408dadc877631fb (patch)
tree3145a8c1372c44711d38feefeba39c7d4098f139 /apps/plugin.h
parent8411614b8a068a4f274c3841aa55aab1df1bc246 (diff)
downloadrockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.tar.gz
rockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.zip
Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index f15c626667..113296c19a 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -65,6 +65,7 @@ void* plugin_get_buffer(size_t *buffer_size);
65#include "misc.h" 65#include "misc.h"
66#include "filefuncs.h" 66#include "filefuncs.h"
67#if (CONFIG_CODEC == SWCODEC) 67#if (CONFIG_CODEC == SWCODEC)
68#include "pcm_mixer.h"
68#include "dsp.h" 69#include "dsp.h"
69#include "codecs.h" 70#include "codecs.h"
70#include "playback.h" 71#include "playback.h"
@@ -145,7 +146,7 @@ void* plugin_get_buffer(size_t *buffer_size);
145#define PLUGIN_MAGIC 0x526F634B /* RocK */ 146#define PLUGIN_MAGIC 0x526F634B /* RocK */
146 147
147/* increase this every time the api struct changes */ 148/* increase this every time the api struct changes */
148#define PLUGIN_API_VERSION 205 149#define PLUGIN_API_VERSION 206
149 150
150/* update this to latest version if a change to the api struct breaks 151/* update this to latest version if a change to the api struct breaks
151 backwards compatibility (and please take the opportunity to sort in any 152 backwards compatibility (and please take the opportunity to sort in any
@@ -635,9 +636,8 @@ struct plugin_api {
635 const void* (*pcm_get_peak_buffer)(int *count); 636 const void* (*pcm_get_peak_buffer)(int *count);
636 void (*pcm_play_lock)(void); 637 void (*pcm_play_lock)(void);
637 void (*pcm_play_unlock)(void); 638 void (*pcm_play_unlock)(void);
638 void (*pcmbuf_beep)(unsigned int frequency, 639 void (*beep_play)(unsigned int frequency, unsigned int duration,
639 size_t duration, 640 unsigned int amplitude);
640 int amplitude);
641#ifdef HAVE_RECORDING 641#ifdef HAVE_RECORDING
642 const unsigned long *rec_freq_sampr; 642 const unsigned long *rec_freq_sampr;
643 void (*pcm_init_recording)(void); 643 void (*pcm_init_recording)(void);
@@ -908,6 +908,8 @@ struct plugin_api {
908 908
909 /* new stuff at the end, sort into place next time 909 /* new stuff at the end, sort into place next time
910 the API gets incompatible */ 910 the API gets incompatible */
911 enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel);
912 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
911}; 913};
912 914
913/* plugin header */ 915/* plugin header */