mirror of https://github.com/odrling/Aegisub
Fix bugs in separating Int16Mono and original audio
* A memory leak in FillBufferInt16Mono * A now unnecessary assert
This commit is contained in:
parent
45cd713ef9
commit
56434c5f58
|
@ -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 {
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue