forked from mia/Aegisub
Additional sanity check in spectrum code
Changed default settings for spectrum (no reason to throw away 32 perfectly good bands!) Originally committed to SVN as r735.
This commit is contained in:
parent
4e463a098a
commit
a6773bf842
2 changed files with 4 additions and 2 deletions
|
@ -271,6 +271,8 @@ void AudioSpectrum::RenderRange(__int64 range_start, __int64 range_end, bool sel
|
|||
}
|
||||
|
||||
#define WRITE_PIXEL \
|
||||
if (intensity < 0) intensity = 0; \
|
||||
if (intensity > 255) intensity = 255; \
|
||||
img[((imgheight-y-1)*imgpitch+x)*3 + 0] = palette[intensity*3+0]; \
|
||||
img[((imgheight-y-1)*imgpitch+x)*3 + 1] = palette[intensity*3+1]; \
|
||||
img[((imgheight-y-1)*imgpitch+x)*3 + 2] = palette[intensity*3+2];
|
||||
|
|
|
@ -156,8 +156,8 @@ void OptionsManager::LoadDefaults() {
|
|||
SetText(_T("Audio Downmixer"),_T("ConvertToMono"));
|
||||
SetText(_T("Audio HD Cache Location"),_T("default"));
|
||||
SetText(_T("Audio HD Cache Name"),_T("audio%02i.tmp"));
|
||||
SetInt(_T("Audio Spectrum Cutoff"),32);
|
||||
SetInt(_T("Audio Spectrum Window"),11);
|
||||
SetInt(_T("Audio Spectrum Cutoff"),0);
|
||||
SetInt(_T("Audio Spectrum Window"),8);
|
||||
|
||||
// Automation
|
||||
SetModificationType(MOD_RESTART);
|
||||
|
|
Loading…
Reference in a new issue