Skip to content

Commit

Permalink
initialize buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
windytan committed Jul 31, 2023
1 parent 01e8cbf commit a13e897
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/deinvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class StdinReader : public AudioReader {

private:
float samplerate_;
std::array<int16_t, kIOBufferSize> buffer_;
std::array<int16_t, kIOBufferSize> buffer_{};
};

#ifdef HAVE_SNDFILE
Expand All @@ -97,7 +97,7 @@ class SndfileReader : public AudioReader {
private:
SF_INFO info_;
SNDFILE* file_;
std::array<float, kIOBufferSize> buffer_;
std::array<float, kIOBufferSize> buffer_{};
};
#endif

Expand All @@ -113,7 +113,7 @@ class RawPCMWriter : public AudioWriter {
bool push(float sample) override;

private:
std::array<int16_t, kIOBufferSize> buffer_;
std::array<int16_t, kIOBufferSize> buffer_{};
size_t buffer_pos_;
};

Expand All @@ -128,7 +128,7 @@ class SndfileWriter : public AudioWriter {
bool write();
SF_INFO info_;
SNDFILE* file_;
std::array<float, kIOBufferSize> buffer_;
std::array<float, kIOBufferSize> buffer_{};
size_t buffer_pos_;
};
#endif
Expand Down

0 comments on commit a13e897

Please sign in to comment.