Fix bugs in separating Int16Mono and original audio

* A memory leak in FillBufferInt16Mono
* A now unnecessary assert
This commit is contained in:
wangqr 2019-11-02 00:41:14 -04:00
parent 45cd713ef9
commit 56434c5f58
2 changed files with 1 additions and 3 deletions

View File

@ -116,6 +116,7 @@ void AudioProvider::FillBufferInt16Mono(int16_t* buf, int64_t start, int64_t cou
buf[i] = DownmixToMono<ConvertIntToInt16>(ConvertIntToInt16(buff, bytes_per_sample), channels)[i];
}
}
free(buff);
}
void AudioProvider::GetInt16MonoAudioWithVolume(int16_t *buf, int64_t start, int64_t count, double volume) const {

View File

@ -80,9 +80,6 @@ void AudioWaveformRenderer::Render(wxBitmap &bmp, int start, AudioRenderingStyle
double cur_sample = start * pixel_samples;
assert(provider->GetBytesPerSample() == 2);
assert(provider->GetChannels() == 1);
wxPen pen_peaks(wxPen(pal->get(0.4f)));
wxPen pen_avgs(wxPen(pal->get(0.7f)));