diff --git a/FastHCADecoder b/FastHCADecoder index 02bd72d..7d9b456 160000 --- a/FastHCADecoder +++ b/FastHCADecoder @@ -1 +1 @@ -Subproject commit 02bd72dca3634e54ea6d6c5440ba2eefac28e637 +Subproject commit 7d9b45603ca4c2374717fcf47b99827ccb965298 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 780070d..69eaa73 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -502,7 +502,7 @@ std::string MainWindow::filterCommand(const std::string &command) { while(idolnum >= 0 && idolnum < unit_size) { - if(singing_set.find(idolnum) == singing_set.end() && idol_to_type[current_idols[idolnum]] & ALL) + if(singing_set.find(idolnum) == singing_set.end() && !(idols[idolnum]->get_decode_channel() == 0 && idols_oneshot[idolnum]->get_decode_channel() == 0)) { singing_set.insert(idolnum); filtered += (char)(idolnum + 48); diff --git a/src/utils.cpp b/src/utils.cpp index f52242d..78371e2 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -35,14 +35,22 @@ void export_to_wav(HSTREAM mix_stream, const std::string& filename, const std::m // Get number of samples until next sync event int numsamples_to_read = 50000; auto it = event_list.upper_bound(p); - if(it != event_list.end() && it->first - p < numsamples_to_read) + if(it != event_list.end()) { - numsamples_to_read = it->first - p; + int samples_to_next = it->first - p; + if(samples_to_next > 0 && samples_to_next < numsamples_to_read) + { + numsamples_to_read = it->first - p; + } } it = oneshot_event_list.upper_bound(p); - if(it != event_list.end() && it->first - p < numsamples_to_read) + if(it != event_list.end()) { - numsamples_to_read = it->first - p; + int samples_to_next = it->first - p; + if(samples_to_next > 0 && samples_to_next < numsamples_to_read) + { + numsamples_to_read = it->first - p; + } } c = BASS_ChannelGetData(mix_stream, buf, numsamples_to_read * 4); p += numsamples_to_read;