dsp_interface: Move sink to the last in member list (#5844)

So that it is destructed first. Otherwise, the TimeStretcher will be destructed before the Sink, which might cause segfaults when the Sink tries to read data from the TimeStretcher afterwards.
This commit is contained in:
Pengfei Zhu authored and GitHub committed 2021-09-20 22:40:36 +05:30
1 parent 4817b00843
commit 19617f7edb
1 file changed
+1 -1
+1 -1
View File
@@ -108,12 +108,12 @@ private:
void FlushResidualStretcherAudio();
void OutputCallback(s16* buffer, std::size_t num_frames);
std::unique_ptr<Sink> sink;
std::atomic<bool> perform_time_stretching = false;
std::atomic<bool> flushing_time_stretcher = false;
Common::RingBuffer<s16, 0x2000, 2> fifo;
std::array<s16, 2> last_frame{};
TimeStretcher time_stretcher;
std::unique_ptr<Sink> sink;
template <class Archive>
void serialize(Archive& ar, const unsigned int) {}