summaryrefslogtreecommitdiff
path: root/apps/pcmbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/pcmbuf.h')
-rw-r--r--apps/pcmbuf.h69
1 files changed, 24 insertions, 45 deletions
diff --git a/apps/pcmbuf.h b/apps/pcmbuf.h
index 1d893f9c62..f8e69055be 100644
--- a/apps/pcmbuf.h
+++ b/apps/pcmbuf.h
@@ -21,58 +21,37 @@
#ifndef PCMBUF_H
#define PCMBUF_H
-#define PCMBUF_TARGET_CHUNK 32768 /* This is the target fill size of chunks
- on the pcm buffer */
-#define PCMBUF_MINAVG_CHUNK 24576 /* This is the minimum average size of
- chunks on the pcm buffer (or we run out
- of buffer descriptors, which is
- non-fatal) */
-#define PCMBUF_MIN_CHUNK 4096 /* We try to never feed a chunk smaller than
- this to the DMA */
-#define PCMBUF_MIX_CHUNK 8192 /* This is the maximum size of one packet
- for mixing (crossfade or voice) */
+/* playback */
+size_t pcmbuf_init(unsigned char *bufend);
+void pcmbuf_play_start(void);
+void pcmbuf_play_stop(void);
+void pcmbuf_pause(bool pause);
+void pcmbuf_start_track_change(bool manual_skip);
+void *pcmbuf_request_buffer(int *count);
+void pcmbuf_write_complete(int count);
-/* Returns true if the buffer needs to change size */
+/* crossfade */
+bool pcmbuf_is_crossfade_active(void);
+void pcmbuf_request_crossfade_enable(bool on_off);
bool pcmbuf_is_same_size(void);
-size_t pcmbuf_init(unsigned char *bufend);
-/* Size in bytes used by the pcmbuffer */
+
+/* voice */
+void *pcmbuf_request_voice_buffer(int *count);
+void pcmbuf_write_voice_complete(int count);
+
+/* debug menu, other metrics */
+size_t pcmbuf_free(void);
size_t pcmbuf_get_bufsize(void);
+int pcmbuf_descs(void);
+int pcmbuf_used_descs(void);
#ifdef ROCKBOX_HAS_LOGF
-/* just used for logging for now */
-unsigned char * pcmbuf_get_meminfo(size_t *length);
+unsigned char *pcmbuf_get_meminfo(size_t *length);
#endif
-void pcmbuf_pause(bool pause);
-void pcmbuf_play_stop(void);
-bool pcmbuf_is_crossfade_active(void);
-
-/* These functions are for playing chained buffers of PCM data */
-#if defined(HAVE_ADJUSTABLE_CPU_FREQ)
-void pcmbuf_boost(bool state);
-void pcmbuf_set_boost_mode(bool state);
-#else
-#define pcmbuf_boost(state) do { } while(0)
-#define pcmbuf_set_boost_mode(state) do { } while(0)
-#endif
+/* misc */
+void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude);
bool pcmbuf_is_lowdata(void);
-void pcmbuf_play_start(void);
-bool pcmbuf_crossfade_init(bool manual_skip);
-void pcmbuf_start_track_change(void);
-size_t pcmbuf_free(void);
-unsigned long pcmbuf_get_latency(void);
void pcmbuf_set_low_latency(bool state);
-void * pcmbuf_request_buffer(int *count);
-void pcmbuf_write_complete(int count);
-void * pcmbuf_request_voice_buffer(int *count);
-void pcmbuf_write_voice_complete(int count);
-bool pcmbuf_is_crossfade_enabled(void);
-void pcmbuf_crossfade_enable(bool on_off);
-void pcmbuf_crossfade_enable_finished(void);
-int pcmbuf_usage(void);
-int pcmbuf_mix_free(void);
-void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude);
-
-int pcmbuf_used_descs(void);
-int pcmbuf_descs(void);
+unsigned long pcmbuf_get_latency(void);
#endif