mirror of https://github.com/odrling/Aegisub
Throw an error instead of crashing if user attempts to load audio with bitdepth >16bits/sample. Updates #996.
Originally committed to SVN as r3545.
This commit is contained in:
parent
3edb446bec
commit
fcd8f4e04e
|
@ -232,6 +232,10 @@ AudioProvider *CreateConvertAudioProvider(AudioProvider *source_provider) {
|
|||
provider->GetSampleRate() < 32000 ||
|
||||
!provider->AreSamplesNativeEndian())
|
||||
{
|
||||
// @todo add support for more bitdepths (i.e. 24- and 32-bit audio)
|
||||
if (provider->GetBytesPerSample() > 2)
|
||||
throw _T("Audio format converter: audio with bitdepths greater than 16 bits/sample is currently unsupported");
|
||||
|
||||
provider = new ConvertAudioProvider(provider);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue