diff options
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r-- | apps/pcmbuf.c | 41 |
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. */ |
79 | static size_t pcmbuf_size IDATA_ATTR = 0; | 79 | static size_t pcmbuf_size = 0; |
80 | static char *pcmbuf_bufend IDATA_ATTR; | 80 | static char *pcmbuf_bufend; |
81 | static char *pcmbuffer IDATA_ATTR; | 81 | static char *pcmbuffer; |
82 | /* Current PCM buffer write index. */ | 82 | /* Current PCM buffer write index. */ |
83 | static size_t pcmbuffer_pos IDATA_ATTR; | 83 | static size_t pcmbuffer_pos; |
84 | /* Amount pcmbuffer_pos will be increased.*/ | 84 | /* Amount pcmbuffer_pos will be increased.*/ |
85 | static size_t pcmbuffer_fillpos IDATA_ATTR; | 85 | static size_t pcmbuffer_fillpos; |
86 | 86 | ||
87 | static struct chunkdesc *first_desc; | 87 | static struct chunkdesc *first_desc; |
88 | 88 | ||
89 | /* Gapless playback */ | 89 | /* Gapless playback */ |
90 | static bool track_transition IDATA_ATTR; | 90 | static bool track_transition; |
91 | 91 | ||
92 | /* Fade effect */ | 92 | /* Fade effect */ |
93 | static unsigned int fade_vol = MIX_AMP_UNITY; | 93 | static 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 */ |
100 | static char *fadebuf IDATA_ATTR; | 100 | static char *fadebuf; |
101 | 101 | ||
102 | /* Crossfade related state */ | 102 | /* Crossfade related state */ |
103 | static bool crossfade_enabled; | 103 | static bool crossfade_enabled; |
104 | static bool crossfade_enable_request; | 104 | static bool crossfade_enable_request; |
105 | static bool crossfade_mixmode; | 105 | static bool crossfade_mixmode; |
106 | static bool crossfade_auto_skip; | 106 | static bool crossfade_auto_skip; |
107 | static bool crossfade_active IDATA_ATTR; | 107 | static bool crossfade_active; |
108 | static bool crossfade_track_change_started IDATA_ATTR; | 108 | static bool crossfade_track_change_started; |
109 | 109 | ||
110 | /* Track the current location for processing crossfade */ | 110 | /* Track the current location for processing crossfade */ |
111 | static struct chunkdesc *crossfade_chunk IDATA_ATTR; | 111 | static struct chunkdesc *crossfade_chunk; |
112 | static size_t crossfade_sample IDATA_ATTR; | 112 | static size_t crossfade_sample; |
113 | 113 | ||
114 | /* Counters for fading in new data */ | 114 | /* Counters for fading in new data */ |
115 | static size_t crossfade_fade_in_total IDATA_ATTR; | 115 | static size_t crossfade_fade_in_total; |
116 | static size_t crossfade_fade_in_rem IDATA_ATTR; | 116 | static size_t crossfade_fade_in_rem; |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | static struct chunkdesc *read_chunk IDATA_ATTR; | 119 | static struct chunkdesc *read_chunk; |
120 | static struct chunkdesc *read_end_chunk IDATA_ATTR; | 120 | static struct chunkdesc *read_end_chunk; |
121 | static struct chunkdesc *write_chunk IDATA_ATTR; | 121 | static struct chunkdesc *write_chunk; |
122 | static struct chunkdesc *write_end_chunk IDATA_ATTR; | 122 | static struct chunkdesc *write_end_chunk; |
123 | static size_t last_chunksize IDATA_ATTR; | 123 | static size_t last_chunksize; |
124 | 124 | ||
125 | static size_t pcmbuf_unplayed_bytes IDATA_ATTR; | 125 | static size_t pcmbuf_unplayed_bytes; |
126 | static size_t pcmbuf_watermark IDATA_ATTR; | 126 | static size_t pcmbuf_watermark; |
127 | 127 | ||
128 | static bool low_latency_mode = false; | 128 | static bool low_latency_mode = false; |
129 | static bool flush_pcmbuf = false; | 129 | static 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. */ |
638 | static void pcmbuf_pcm_callback(unsigned char** start, size_t* size) ICODE_ATTR; | ||
639 | static void pcmbuf_pcm_callback(unsigned char** start, size_t* size) | 638 | static void pcmbuf_pcm_callback(unsigned char** start, size_t* size) |
640 | { | 639 | { |
641 | { | 640 | { |