aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-12-15 23:42:19 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-12-15 23:42:19 +0000
commitace7a295ec163ffca50a25651766f9064382ecb3 (patch)
tree3530e53590174668b5a6e89e110bf3bc6a1061de /src
parent995cd023063be6f9e1bbcf59883e98ffdbb3eccb (diff)
downloadusdx-ace7a295ec163ffca50a25651766f9064382ecb3.tar.gz
usdx-ace7a295ec163ffca50a25651766f9064382ecb3.tar.xz
usdx-ace7a295ec163ffca50a25651766f9064382ecb3.zip
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
Diffstat (limited to '')
-rw-r--r--src/media/UAudioDecoder_FFmpeg.pas5
1 files changed, 5 insertions, 0 deletions
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;