citra-emu
/
citra
Archived
1
0
Fork 0

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 2021-09-21 01:10:36 +08:00 committed by GitHub
parent 4817b00843
commit 19617f7edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -108,12 +108,12 @@ private:
void FlushResidualStretcherAudio(); void FlushResidualStretcherAudio();
void OutputCallback(s16* buffer, std::size_t num_frames); void OutputCallback(s16* buffer, std::size_t num_frames);
std::unique_ptr<Sink> sink;
std::atomic<bool> perform_time_stretching = false; std::atomic<bool> perform_time_stretching = false;
std::atomic<bool> flushing_time_stretcher = false; std::atomic<bool> flushing_time_stretcher = false;
Common::RingBuffer<s16, 0x2000, 2> fifo; Common::RingBuffer<s16, 0x2000, 2> fifo;
std::array<s16, 2> last_frame{}; std::array<s16, 2> last_frame{};
TimeStretcher time_stretcher; TimeStretcher time_stretcher;
std::unique_ptr<Sink> sink;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) {} void serialize(Archive& ar, const unsigned int) {}