MCPcopy Create free account
hub / github.com/RHVoice/RHVoice / finish

Method finish

src/core/speech_processor.cpp:77–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 void speech_processor::finish()
78 {
79 if(!input.empty())
80 {
81 on_input();
82 input.clear();
83 if(is_stopped())
84 return;
85 }
86 on_end_of_input();
87 if(is_stopped())
88 return;
89 on_output();
90 if(is_stopped())
91 return;
92 if(!next)
93 {
94 on_finished();
95 return;
96 }
97 if(!insertion.empty())
98 {
99 next->insert(&insertion[0],insertion.size());
100 insertion.clear();
101 if(is_stopped())
102 {
103 output.clear();
104 return;
105 }
106 }
107 if(!output.empty())
108 {
109 next->process(&output[0],output.size());
110 output.clear();
111 }
112 if(is_stopped())
113 return;
114 next->finish();
115 if(is_stopped())
116 return;
117 on_finished();
118 }
119
120 void speech_processor::insert(sample_ptr samples,std::size_t count)
121 {

Callers

nothing calls this directly

Calls 5

insertMethod · 0.80
emptyMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected