summaryrefslogtreecommitdiff
path: root/apps/pcmbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r--apps/pcmbuf.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index f2f94e3bc9..5ef517968a 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -76,18 +76,18 @@ struct chunkdesc
76 ((bufsize) / PCMBUF_MINAVG_CHUNK) 76 ((bufsize) / PCMBUF_MINAVG_CHUNK)
77 77
78/* Size of the PCM buffer. */ 78/* Size of the PCM buffer. */
79static size_t pcmbuf_size IDATA_ATTR = 0; 79static size_t pcmbuf_size = 0;
80static char *pcmbuf_bufend IDATA_ATTR; 80static char *pcmbuf_bufend;
81static char *pcmbuffer IDATA_ATTR; 81static char *pcmbuffer;
82/* Current PCM buffer write index. */ 82/* Current PCM buffer write index. */
83static size_t pcmbuffer_pos IDATA_ATTR; 83static size_t pcmbuffer_pos;
84/* Amount pcmbuffer_pos will be increased.*/ 84/* Amount pcmbuffer_pos will be increased.*/
85static size_t pcmbuffer_fillpos IDATA_ATTR; 85static size_t pcmbuffer_fillpos;
86 86
87static struct chunkdesc *first_desc; 87static struct chunkdesc *first_desc;
88 88
89/* Gapless playback */ 89/* Gapless playback */
90static bool track_transition IDATA_ATTR; 90static bool track_transition;
91 91
92/* Fade effect */ 92/* Fade effect */
93static unsigned int fade_vol = MIX_AMP_UNITY; 93static unsigned int fade_vol = MIX_AMP_UNITY;
@@ -97,33 +97,33 @@ static bool soft_mode = false;
97 97
98#ifdef HAVE_CROSSFADE 98#ifdef HAVE_CROSSFADE
99/* Crossfade buffer */ 99/* Crossfade buffer */
100static char *fadebuf IDATA_ATTR; 100static char *fadebuf;
101 101
102/* Crossfade related state */ 102/* Crossfade related state */
103static bool crossfade_enabled; 103static bool crossfade_enabled;
104static bool crossfade_enable_request; 104static bool crossfade_enable_request;
105static bool crossfade_mixmode; 105static bool crossfade_mixmode;
106static bool crossfade_auto_skip; 106static bool crossfade_auto_skip;
107static bool crossfade_active IDATA_ATTR; 107static bool crossfade_active;
108static bool crossfade_track_change_started IDATA_ATTR; 108static bool crossfade_track_change_started;
109 109
110/* Track the current location for processing crossfade */ 110/* Track the current location for processing crossfade */
111static struct chunkdesc *crossfade_chunk IDATA_ATTR; 111static struct chunkdesc *crossfade_chunk;
112static size_t crossfade_sample IDATA_ATTR; 112static size_t crossfade_sample;
113 113
114/* Counters for fading in new data */ 114/* Counters for fading in new data */
115static size_t crossfade_fade_in_total IDATA_ATTR; 115static size_t crossfade_fade_in_total;
116static size_t crossfade_fade_in_rem IDATA_ATTR; 116static size_t crossfade_fade_in_rem;
117#endif 117#endif
118 118
119static struct chunkdesc *read_chunk IDATA_ATTR; 119static struct chunkdesc *read_chunk;
120static struct chunkdesc *read_end_chunk IDATA_ATTR; 120static struct chunkdesc *read_end_chunk;
121static struct chunkdesc *write_chunk IDATA_ATTR; 121static struct chunkdesc *write_chunk;
122static struct chunkdesc *write_end_chunk IDATA_ATTR; 122static struct chunkdesc *write_end_chunk;
123static size_t last_chunksize IDATA_ATTR; 123static size_t last_chunksize;
124 124
125static size_t pcmbuf_unplayed_bytes IDATA_ATTR; 125static size_t pcmbuf_unplayed_bytes;
126static size_t pcmbuf_watermark IDATA_ATTR; 126static size_t pcmbuf_watermark;
127 127
128static bool low_latency_mode = false; 128static bool low_latency_mode = false;
129static bool flush_pcmbuf = false; 129static bool flush_pcmbuf = false;
@@ -635,7 +635,6 @@ bool pcmbuf_start_track_change(bool auto_skip)
635 * buffer is empty except for uncommitted samples. Then they are committed 635 * buffer is empty except for uncommitted samples. Then they are committed
636 * and sent to the PCM driver for playback. The third part performs the 636 * and sent to the PCM driver for playback. The third part performs the
637 * operations involved in sending a new chunk to the DMA. */ 637 * operations involved in sending a new chunk to the DMA. */
638static void pcmbuf_pcm_callback(unsigned char** start, size_t* size) ICODE_ATTR;
639static void pcmbuf_pcm_callback(unsigned char** start, size_t* size) 638static void pcmbuf_pcm_callback(unsigned char** start, size_t* size)
640{ 639{
641 { 640 {