Player takes note from tuner in every cases
This commit is contained in:
parent
08999a8d8d
commit
f143dcbb3d
1 changed files with 9 additions and 1 deletions
|
@ -190,7 +190,11 @@ void TunerWorker::Entry()
|
||||||
pa_simple_free(p_record);
|
pa_simple_free(p_record);
|
||||||
p_record = nullptr;
|
p_record = nullptr;
|
||||||
}
|
}
|
||||||
// free playing after a delay of inactivity to avoid clac
|
// free playing if record running, after a delay
|
||||||
|
if (play_stop_counter >= 10 && p_play) {
|
||||||
|
pa_simple_free(p_play);
|
||||||
|
p_play = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// wait for running
|
// wait for running
|
||||||
if (!running && !playing) {
|
if (!running && !playing) {
|
||||||
|
@ -308,6 +312,10 @@ void TunerWorker::Entry()
|
||||||
if (stop_counter) play_stop_counter = stop_counter + 1;
|
if (stop_counter) play_stop_counter = stop_counter + 1;
|
||||||
|
|
||||||
} // playing
|
} // playing
|
||||||
|
else {
|
||||||
|
// increment if record running
|
||||||
|
play_stop_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
// prevent screen blanking
|
// prevent screen blanking
|
||||||
nb_sample_running += nbSampleBuffer;
|
nb_sample_running += nbSampleBuffer;
|
||||||
|
|
Loading…
Reference in a new issue