diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-07-02 11:55:38 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-07-02 11:55:38 +0000 |
commit | 22b6def065ab7c2ca030f405577e34104ad20011 (patch) | |
tree | 6be548bf591d2365077b74679048737fe51792a2 /firmware/export | |
parent | 8c954e28b75b47543f69abe2c169d83ad38c26ae (diff) | |
download | rockbox-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.h | 10 | ||||
-rw-r--r-- | firmware/export/pcm_mixer.h | 4 |
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 | ||
25 | struct pcm_peaks | ||
26 | { | ||
27 | long period; | ||
28 | long tick; | ||
29 | uint16_t val[2]; | ||
30 | }; | ||
31 | |||
32 | void 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 */ |
104 | void * mixer_channel_get_buffer(enum pcm_mixer_channel channel, int *count); | 104 | void * mixer_channel_get_buffer(enum pcm_mixer_channel channel, int *count); |
105 | 105 | ||
106 | /* Calculate peak values for channel */ | ||
107 | void 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 */ |
107 | void mixer_reset(void); | 111 | void mixer_reset(void); |
108 | 112 | ||