diff options
author | Sven Gothel <[email protected]> | 2023-10-15 07:10:15 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-10-15 07:10:15 +0200 |
commit | 2c80bb2e6eb12e155d747daf8a08362396d5e0fc (patch) | |
tree | d7c2d4854b281ef6b412490e46f6ae8c5956ee78 /src/jogl/classes/jogamp/opengl/util/av/impl | |
parent | b1956113f5601b0cc6ac525d3918a0dfa8d240af (diff) |
Bug 1472: Enhance GLMediaPlayer AV Sync: Fix FFMPEGMediaPlayer's audio resample: Use swr_get_out_samples(..) to calculate the required output sample count
Notable when playing audio with e.g. 24k sample rate on a 48k OpenAL ALAudioSink,
the sample duration was cut in half due to erroneous resampling missing half the required samples.
Using swr_get_out_samples(..) resolves this issue pre swr_convert(..), the resampling.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/impl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java index 71fa70080..d0b6ab7e0 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java @@ -51,7 +51,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { private static final List<String> glueLibNames = new ArrayList<String>(); // none - private static final int symbolCount = 59; + private static final int symbolCount = 60; private static final String[] symbolNames = { "avutil_version", "avformat_version", @@ -127,7 +127,8 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { "swr_init", "swr_free", "swr_convert", - /* +5 = 59 */ + "swr_get_out_samples", + /* +6 = 60 */ }; // optional symbol names @@ -151,6 +152,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { "swr_init", "swr_free", "swr_convert", + "swr_get_out_samples", }; private static final int LIB_COUNT = 5; |