MCPcopy Create free account
hub / github.com/clangen/musikcube / Dispose

Method Dispose

src/plugins/server/TranscodingAudioDataStream.cpp:151–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void TranscodingAudioDataStream::Dispose() {
152 if (this->pcmBuffer) {
153 this->pcmBuffer->Release();
154 this->pcmBuffer = nullptr;
155 }
156
157 if (this->decoder) {
158 this->decoder->Release();
159 this->decoder = nullptr;
160 }
161
162 if (this->input) {
163 this->input->Release();
164 this->input = nullptr;
165 }
166
167 if (this->encoder) {
168 this->encoder->Release();
169 this->encoder = nullptr;
170 }
171
172 if (this->outFile) {
173 fclose(this->outFile);
174 this->outFile = nullptr;
175 std::error_code ec;
176 fs::remove(fs::u8path(this->tempFilename), ec);
177 }
178
179 delete this;
180}
181
182void TranscodingAudioDataStream::Interrupt() {
183 this->interrupted = true;

Callers 2

CloseMethod · 0.95
ReleaseMethod · 0.95

Calls 1

ReleaseMethod · 0.45

Tested by

no test coverage detected