summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-07-02 11:55:38 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-07-02 11:55:38 +0000
commit22b6def065ab7c2ca030f405577e34104ad20011 (patch)
tree6be548bf591d2365077b74679048737fe51792a2 /firmware/export
parent8c954e28b75b47543f69abe2c169d83ad38c26ae (diff)
downloadrockbox-22b6def065ab7c2ca030f405577e34104ad20011.tar.gz
rockbox-22b6def065ab7c2ca030f405577e34104ad20011.zip
Use playback channel directly for peakmeters and plugins using peak calculation. Also, for now, don't allow mixer playback to overlap recording, even if full duplex works.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30119 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/pcm-internal.h10
-rw-r--r--firmware/export/pcm_mixer.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/firmware/export/pcm-internal.h b/firmware/export/pcm-internal.h
index d69138f534..bae6a368fa 100644
--- a/firmware/export/pcm-internal.h
+++ b/firmware/export/pcm-internal.h
@@ -22,6 +22,16 @@
22#ifndef PCM_INTERNAL_H 22#ifndef PCM_INTERNAL_H
23#define PCM_INTERNAL_H 23#define PCM_INTERNAL_H
24 24
25struct pcm_peaks
26{
27 long period;
28 long tick;
29 uint16_t val[2];
30};
31
32void pcm_do_peak_calculation(struct pcm_peaks *peaks, bool active,
33 const void *addr, int count);
34
25/** The following are for internal use between pcm.c and target- 35/** The following are for internal use between pcm.c and target-
26 specific portion **/ 36 specific portion **/
27 37
diff --git a/firmware/export/pcm_mixer.h b/firmware/export/pcm_mixer.h
index 9c4e06e0be..be10601ffd 100644
--- a/firmware/export/pcm_mixer.h
+++ b/firmware/export/pcm_mixer.h
@@ -103,6 +103,10 @@ size_t mixer_channel_get_bytes_waiting(enum pcm_mixer_channel channel);
103/* Return pointer to channel's playing audio data and the size remaining */ 103/* Return pointer to channel's playing audio data and the size remaining */
104void * mixer_channel_get_buffer(enum pcm_mixer_channel channel, int *count); 104void * mixer_channel_get_buffer(enum pcm_mixer_channel channel, int *count);
105 105
106/* Calculate peak values for channel */
107void mixer_channel_calculate_peaks(enum pcm_mixer_channel channel,
108 int *left, int *right);
109
106/* Stop ALL channels and PCM and reset state */ 110/* Stop ALL channels and PCM and reset state */
107void mixer_reset(void); 111void mixer_reset(void);
108 112