| 149 | } |
| 150 | |
| 151 | void 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 | |
| 182 | void TranscodingAudioDataStream::Interrupt() { |
| 183 | this->interrupted = true; |