File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -219,20 +219,20 @@ void AOMusicPlayer::set_looping(bool loop_song, int channel)
219219 loop_sync[channel] = 0 ;
220220 }
221221
222- if (loop_start[channel] > 0 ) {
223- if (loop_end [channel] > 0 && ( loop_end[channel] > loop_start[channel]) )
222+ if (loop_start[channel] >= 0 ) {
223+ if (loop_start [channel] < loop_end[channel])
224224 {
225225 // Loop when the endpoint is reached.
226226 loop_sync[channel] = BASS_ChannelSetSync (
227- m_stream_list[channel], BASS_SYNC_END | BASS_SYNC_MIXTIME,
228- loop_end[channel] , loopProc, &loop_start[channel]);
227+ m_stream_list[channel], BASS_SYNC_POS | BASS_SYNC_MIXTIME,
228+ loop_end[channel], loopProc, &loop_start[channel]);
229229 }
230230 else
231231 {
232232 // Loop when the end of the file is reached.
233233 loop_sync[channel] = BASS_ChannelSetSync (
234- m_stream_list[channel], BASS_SYNC_POS | BASS_SYNC_MIXTIME,
235- 0 , loopProc, &loop_start[channel]);
234+ m_stream_list[channel], BASS_SYNC_END | BASS_SYNC_MIXTIME,
235+ 0 , loopProc, &loop_start[channel]);
236236 }
237237 }
238238}
You can’t perform that action at this time.
0 commit comments