From ace7a295ec163ffca50a25651766f9064382ecb3 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 15 Dec 2013 23:42:19 +0000 Subject: fix the screwy sound by requesting the required sample format. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3035 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UAudioDecoder_FFmpeg.pas | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas index 0cdf9555..301dc744 100644 --- a/src/media/UAudioDecoder_FFmpeg.pas +++ b/src/media/UAudioDecoder_FFmpeg.pas @@ -374,6 +374,11 @@ begin // set debug options fCodecCtx^.debug_mv := 0; fCodecCtx^.debug := 0; + + {$IF FFMPEG_VERSION_INT > 1001000} + // set requested sample format + fCodecCtx^.request_sample_fmt := AV_SAMPLE_FMT_S16; + {$IFEND} // detect bug-workarounds automatically fCodecCtx^.workaround_bugs := FF_BUG_AUTODETECT; -- cgit v1.2.3