@@ -111,6 +111,7 @@ where
111
111
// This function is non-trivial because the boundary between two
112
112
// sounds in the queue should be a span boundary as well. Further more
113
113
// we can *only* return Some(0) if the queue should stop playing.
114
+ //
114
115
// This function can be called at any time though its normally only
115
116
// called at the end of the span to get how long the next span will be.
116
117
//
@@ -123,30 +124,6 @@ where
123
124
// scenario. To handle this situation we force a span to have a
124
125
// maximum number of samples with a constant. If the source ends before
125
126
// that point we need to start silence for the remainder of the forced span.
126
- //
127
- // There are a lot of cases here:
128
- // - not filling silence, current span is done
129
- // move to next
130
- // - not filling silence, known span length.
131
- // report span length from current
132
- // - not filling silence, unknown span length have lower bound.
133
- // report lower bound
134
- // - not filling silence, unknown span length, no lower bound.
135
- // report fixed number of frames, if its too long we will get
136
- // silence for that length
137
- // - filling silence, we have a next, however span is not finished,
138
- // next is same channel count and sample rate.
139
- // move to next,
140
- // - filling silence, we have a next, however span is not finished,
141
- // next is diff channel count or sample rate.
142
- // play silence for rest of span
143
- // - filling silence, we have a next, span is done
144
- // move to next
145
- // - filling silence, no next, however span is not finished.
146
- // return samples left in span
147
- // - filling silence, no next, span is done.
148
- // new silence span with fixed length, match previous sample_rate
149
- // and channel count.
150
127
151
128
if let Some ( len) = self . current . current_span_len ( ) {
152
129
// correct len for buffered sample
0 commit comments