diff options
Diffstat (limited to 'firmware/export/pcm.h')
-rw-r--r-- | firmware/export/pcm.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/export/pcm.h b/firmware/export/pcm.h index df82c6092d..608129c078 100644 --- a/firmware/export/pcm.h +++ b/firmware/export/pcm.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef PCM_PLAYBACK_H | 21 | #ifndef PCM_PLAYBACK_H |
22 | #define PCM_PLAYBACK_H | 22 | #define PCM_PLAYBACK_H |
23 | 23 | ||
24 | #include <string.h> /* size_t */ | 24 | #include <sys/types.h> /* size_t, uint32_t */ |
25 | #include "config.h" | 25 | #include "config.h" |
26 | 26 | ||
27 | enum pcm_dma_status | 27 | enum pcm_dma_status |
@@ -71,6 +71,16 @@ void pcm_play_data(pcm_play_callback_type get_more, | |||
71 | pcm_status_callback_type status_cb, | 71 | pcm_status_callback_type status_cb, |
72 | const void *start, size_t size); | 72 | const void *start, size_t size); |
73 | 73 | ||
74 | /* Kept internally for global PCM and used by mixer's verion of peak | ||
75 | calculation */ | ||
76 | struct pcm_peaks | ||
77 | { | ||
78 | uint32_t left; /* Left peak value */ | ||
79 | uint32_t right; /* Right peak value */ | ||
80 | long period; /* For tracking calling period */ | ||
81 | long tick; /* Last tick called */ | ||
82 | }; | ||
83 | |||
74 | void pcm_calculate_peaks(int *left, int *right); | 84 | void pcm_calculate_peaks(int *left, int *right); |
75 | const void* pcm_get_peak_buffer(int* count); | 85 | const void* pcm_get_peak_buffer(int* count); |
76 | size_t pcm_get_bytes_waiting(void); | 86 | size_t pcm_get_bytes_waiting(void); |