Saints Row 2 crashes after GameSpy logo when FAudio compiled with WMA support #184

Closed
opened 2020-04-26 01:11:57 -05:00 by GloriousEggroll · 14 comments
GloriousEggroll commented 2020-04-26 01:11:57 -05:00 (Migrated from github.com)

-Does not seem to occur when FAudio is compiled without ffmpeg. (Proton uses 20.03 with no ffmpeg and works fine).
-This looks to be related to the wavebank work committed after 20.01
-20.01, while it does load, does not have sound.

-Does not seem to occur when FAudio is compiled without ffmpeg. (Proton uses 20.03 with no ffmpeg and works fine). -This looks to be related to the wavebank work committed after 20.01 -20.01, while it does load, does not have sound.
flibitijibibo commented 2020-04-26 07:13:03 -05:00 (Migrated from github.com)

It most likely only worked because we failed to read the XACT data entirely, now it fails because of the bad xWMA support. Unless someone is planning to work on FFmpeg’s wma decoder, the fix is to build without FFmpeg support.

It most likely only worked because we failed to read the XACT data entirely, now it fails because of the bad xWMA support. Unless someone is planning to work on FFmpeg’s wma decoder, the fix is to build without FFmpeg support.
alesliehughes commented 2020-05-06 06:00:16 -05:00 (Migrated from github.com)

I've had looked into this a little, the file format seems to different then the later version. For me, under wine, its failing on the platform check within FAudio.

I've had looked into this a little, the file format seems to different then the later version. For me, under wine, its failing on the platform check within FAudio.
flibitijibibo commented 2020-07-29 09:53:34 -05:00 (Migrated from github.com)

The FFmpeg support has been replaced with GStreamer. My guess is this will still fail since it sounds more like an XACT content issue.

The FFmpeg support has been replaced with GStreamer. My guess is this will still fail since it sounds more like an XACT content issue.
flibitijibibo commented 2020-08-12 10:44:54 -05:00 (Migrated from github.com)
Should be fixed by https://github.com/FNA-XNA/FAudio/commit/f710ff552869c8a47b05db9522eb3806f8fee020
alesliehughes commented 2020-08-12 17:37:01 -05:00 (Migrated from github.com)

When I last looked at this, at appeared that the data structure was out by one byte which is why it ended up with a zero. Adjusting for this, it then crashed when attempt to play.

I've just tried this with your latest change and it still crashes for me.

When I last looked at this, at appeared that the data structure was out by one byte which is why it ended up with a zero. Adjusting for this, it then crashed when attempt to play. I've just tried this with your latest change and it still crashes for me.
flibitijibibo commented 2020-08-13 09:20:48 -05:00 (Migrated from github.com)

You can extract all the XACT data with the SR2 modding tools:

https://www.moddb.com/games/saints-row-2/downloads/gibbeds-tools-for-sr2

Extract audio.vpp_pc and all the data will be there. Note that there are a lot of banks, so it's a very large test case.

You can extract all the XACT data with the SR2 modding tools: https://www.moddb.com/games/saints-row-2/downloads/gibbeds-tools-for-sr2 Extract audio.vpp_pc and all the data will be there. Note that there are a _lot_ of banks, so it's a very large test case.
alesliehughes commented 2020-08-14 00:05:52 -05:00 (Migrated from github.com)

Thanks.

My crash is due to the way the tear down occurs when libSDL cannot connect to a Pulse Audio server.

https://bugzilla.libsdl.org/show_bug.cgi?id=5256

Thanks. My crash is due to the way the tear down occurs when libSDL cannot connect to a Pulse Audio server. https://bugzilla.libsdl.org/show_bug.cgi?id=5256
GloriousEggroll commented 2020-08-16 18:56:27 -05:00 (Migrated from github.com)

I'm trying to get FAudio to compile and use gstreamer in proton but it seems I can't get the flags working properly. FAudio loads in wine but i get no sound on the saints row menu, and no voices in skyrim. Here's what I tried:

FAUDIO_CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Release -DFORCE_ENABLE_DEBUGCONFIGURATION=ON -DLOG_ASSERTIONS=ON -DCMAKE_INSTALL_LIBDIR="lib" -DXNASONG=OFF -DGSTREAMER=ON
...
$(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32)
$(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
		../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \
			-DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \
			$(FAUDIO_CMAKE_FLAGS) \
			-DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"

$(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64)
$(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
		../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \
			-DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \
			$(FAUDIO_CMAKE_FLAGS)
I'm trying to get FAudio to compile and use gstreamer in proton but it seems I can't get the flags working properly. FAudio loads in wine but i get no sound on the saints row menu, and no voices in skyrim. Here's what I tried: ``` FAUDIO_CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Release -DFORCE_ENABLE_DEBUGCONFIGURATION=ON -DLOG_ASSERTIONS=ON -DCMAKE_INSTALL_LIBDIR="lib" -DXNASONG=OFF -DGSTREAMER=ON ... $(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32) $(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \ ../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \ $(FAUDIO_CMAKE_FLAGS) \ -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" $(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64) $(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \ ../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \ $(FAUDIO_CMAKE_FLAGS) ```
flibitijibibo commented 2020-08-16 21:40:03 -05:00 (Migrated from github.com)

My only guess is that the rpaths need to be ripped out entirely, that's how my fnalibs builds work and dropping it into dist/lib64/ with the added plugins dropped into the plugin path worked for me.

My only guess is that the rpaths need to be ripped out entirely, that's how my fnalibs builds work and dropping it into dist/lib64/ with the added plugins dropped into the plugin path worked for me.
GloriousEggroll commented 2020-08-16 22:18:48 -05:00 (Migrated from github.com)

still nothing. I tried all of these:

$(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32)
$(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
		../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \
			-DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \
			$(FAUDIO_CMAKE_FLAGS) \
			-DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"

$(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64)
$(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
		../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \
			-DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \
			$(FAUDIO_CMAKE_FLAGS)
$(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32)
$(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
		../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \
			$(FAUDIO_CMAKE_FLAGS) \
			-DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"

$(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64)
$(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
		../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \
			$(FAUDIO_CMAKE_FLAGS)
still nothing. I tried all of these: ``` $(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32) $(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \ ../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \ $(FAUDIO_CMAKE_FLAGS) \ -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" $(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64) $(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \ ../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \ $(FAUDIO_CMAKE_FLAGS) ``` ``` $(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32) $(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \ ../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \ $(FAUDIO_CMAKE_FLAGS) \ -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" $(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64) $(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \ ../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \ $(FAUDIO_CMAKE_FLAGS) ```
GloriousEggroll commented 2020-08-17 00:03:21 -05:00 (Migrated from github.com)

OK so, with this I now have skyrim voices and Ultimate Marvel vs Capcom menu select sounds:

$(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32)
$(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
		../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \
			-DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \
			-DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0" \
			-DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0" \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \
			$(FAUDIO_CMAKE_FLAGS) \
			-DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"

$(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64)
$(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64)
	cd $(dir $@) && \
		PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
		../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \
			-DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \
			-DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0" \
			-DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0" \
			-DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \
			$(FAUDIO_CMAKE_FLAGS)

And SR2 does not crash, but no music plays at the menu at all, and no audio/voices on the new game intro cutscene, so the same bug is still present. WMA decoding in other games via gstreamer is working as mentioned.

OK so, with this I now have skyrim voices and Ultimate Marvel vs Capcom menu select sounds: ``` $(FAUDIO_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32) $(FAUDIO_CONFIGURE_FILES32): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN32) | gst_base32 $(FAUDIO_OBJ32) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \ ../$(CMAKE_BIN32) $(abspath $(FAUDIO)) \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR32))/lib:$(abspath $(TOOLS_DIR32))/lib/gstreamer-1.0" \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR32))" \ $(FAUDIO_CMAKE_FLAGS) \ -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" $(FAUDIO_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64) $(FAUDIO_CONFIGURE_FILES64): $(FAUDIO)/CMakeLists.txt $(MAKEFILE_DEP) $(CMAKE_BIN64) | gst_base64 $(FAUDIO_OBJ64) cd $(dir $@) && \ PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \ ../$(CMAKE_BIN64) $(abspath $(FAUDIO)) \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-L$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0 -Wl,-rpath-link,$(abspath $(TOOLS_DIR64))/lib:$(abspath $(TOOLS_DIR64))/lib/gstreamer-1.0" \ -DCMAKE_INSTALL_PREFIX="$(abspath $(TOOLS_DIR64))" \ $(FAUDIO_CMAKE_FLAGS) ``` And SR2 does not crash, but no music plays at the menu at all, and no audio/voices on the new game intro cutscene, so the same bug is still present. WMA decoding in other games via gstreamer is working as mentioned.
flibitijibibo commented 2020-08-17 09:15:17 -05:00 (Migrated from github.com)

Did a quick GST_DEBUG=6 check:

0:00:01.995655541 79629       0xca7830 LOG             audiodecoder gstaudiodecoder.c:2034:gst_audio_decoder_chain:<avdec_wmav2-0> received buffer of size 2304 with ts 99:99:99.999999999, duration 99:99:99.999999999
0:00:01.995664046 79629       0xca7830 LOG                  adapter gstadapter.c:390:gst_adapter_push:<GstAdapter@0xc986c0> pushing 0xc985a0 first 2304 bytes
0:00:01.995670714 79629       0xca7830 DEBUG           audiodecoder gstaudiodecoder.c:1624:gst_audio_decoder_push_buffers:<avdec_wmav2-0> available: 2304
0:00:01.995677617 79629       0xca7830 LOG                  adapter gstadapter.c:973:gst_adapter_get_buffer:<GstAdapter@0xc986c0> getting buffer of 2304 bytes
0:00:01.995683926 79629       0xca7830 LOG                  adapter gstadapter.c:988:gst_adapter_get_buffer:<GstAdapter@0xc986c0> providing buffer of 2304 bytes as head buffer
0:00:01.995690048 79629       0xca7830 LOG                  adapter gstadapter.c:634:gst_adapter_flush_unchecked:<GstAdapter@0xc986c0> flushing 2304 bytes
0:00:01.995695638 79629       0xca7830 LOG                  adapter gstadapter.c:655:gst_adapter_flush_unchecked:<GstAdapter@0xc986c0> flushing out head buffer
0:00:01.995701251 79629       0xca7830 LOG                  adapter gstadapter.c:668:gst_adapter_flush_unchecked:<GstAdapter@0xc986c0> adapter empty now
0:00:01.995708852 79629       0xca7830 LOG             audiodecoder gstaudiodecoder.c:1588:gst_audio_decoder_handle_frame:<avdec_wmav2-0> tracking frame size 2304, ts 99:99:99.999999999
0:00:01.995719334 79629       0xca7830 LOG                    libav gstavauddec.c:670:gst_ffmpegauddec_handle_frame:<avdec_wmav2-0> Received new data of size 2304, offset:18446744073709551615, ts:99:99:99.999999999, dur:99:99:99.999999999
0:00:01.995726965 79629       0xca7830 LOG               GST_BUFFER gstbuffer.c:1797:gst_buffer_map_range: buffer 0xc985a0, idx 0, length -1, flags 0001
0:00:01.995733424 79629       0xca7830 LOG               GST_BUFFER gstbuffer.c:241:_get_merged_memory: buffer 0xc985a0, idx 0, length 1
0:00:01.995753881 79629       0xca7830 LOG                    libav gstavauddec.c:697:gst_ffmpegauddec_handle_frame:<avdec_wmav2-0> resized padding buffer to 2368
0:00:01.995841577 79629       0xca7830 ERROR                  libav :0:: next_block_len_bits 4 out of range
0:00:01.995857787 79629       0xca7830 WARN                   libav gstavauddec.c:756:gst_ffmpegauddec_handle_frame:<avdec_wmav2-0> decoding error
0:00:01.995864472 79629       0xca7830 LOG             audiodecoder gstaudiodecoder.c:1710:gst_audio_decoder_push_buffers:<avdec_wmav2-0> done pushing to subclass
0:00:01.995870395 79629       0xca7830 LOG             audiodecoder gstaudiodecoder.c:1815:gst_audio_decoder_chain_forward:<avdec_wmav2-0> chain-done
0:00:01.995879276 79629       0xca7830 DEBUG         GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<avdec_wmav2-0:sink> called chainfunction &gst_audio_decoder_chain with buffer 0xc985a0, returned ok
0:00:01.995889881 79629       0xca7830 DEBUG         GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<typefind:sink> called chainfunction &gst_type_find_element_chain with buffer 0xc985a0, returned ok
0:00:01.995900275 79629       0xca7830 DEBUG         GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<decodebin0:sink> called chainfunction &gst_proxy_pad_chain_default with buffer 0xc985a0, returned ok
0:00:01.995915997 79629       0xca7830 DEBUG                appsink gstappsink.c:1644:gst_app_sink_try_pull_sample:<appsink0> trying to grab a buffer
0:00:01.995924012 79629       0xca7830 DEBUG                appsink gstappsink.c:1655:gst_app_sink_try_pull_sample:<appsink0> waiting for a buffer
0:00:01.995931875 79629       0xca7830 DEBUG                appsink gstappsink.c:1692:gst_app_sink_try_pull_sample:<appsink0> timeout expired, return NULL

Looks like libav isn't prepared to handle this data, so it's out of FAudio's hands. I was able to verify that our data from FACT is otherwise valid, so at this point it's running source voices correctly but cannot be decoded without a fix from the plugin.

Did a quick `GST_DEBUG=6` check: ``` 0:00:01.995655541 79629 0xca7830 LOG audiodecoder gstaudiodecoder.c:2034:gst_audio_decoder_chain:<avdec_wmav2-0> received buffer of size 2304 with ts 99:99:99.999999999, duration 99:99:99.999999999 0:00:01.995664046 79629 0xca7830 LOG adapter gstadapter.c:390:gst_adapter_push:<GstAdapter@0xc986c0> pushing 0xc985a0 first 2304 bytes 0:00:01.995670714 79629 0xca7830 DEBUG audiodecoder gstaudiodecoder.c:1624:gst_audio_decoder_push_buffers:<avdec_wmav2-0> available: 2304 0:00:01.995677617 79629 0xca7830 LOG adapter gstadapter.c:973:gst_adapter_get_buffer:<GstAdapter@0xc986c0> getting buffer of 2304 bytes 0:00:01.995683926 79629 0xca7830 LOG adapter gstadapter.c:988:gst_adapter_get_buffer:<GstAdapter@0xc986c0> providing buffer of 2304 bytes as head buffer 0:00:01.995690048 79629 0xca7830 LOG adapter gstadapter.c:634:gst_adapter_flush_unchecked:<GstAdapter@0xc986c0> flushing 2304 bytes 0:00:01.995695638 79629 0xca7830 LOG adapter gstadapter.c:655:gst_adapter_flush_unchecked:<GstAdapter@0xc986c0> flushing out head buffer 0:00:01.995701251 79629 0xca7830 LOG adapter gstadapter.c:668:gst_adapter_flush_unchecked:<GstAdapter@0xc986c0> adapter empty now 0:00:01.995708852 79629 0xca7830 LOG audiodecoder gstaudiodecoder.c:1588:gst_audio_decoder_handle_frame:<avdec_wmav2-0> tracking frame size 2304, ts 99:99:99.999999999 0:00:01.995719334 79629 0xca7830 LOG libav gstavauddec.c:670:gst_ffmpegauddec_handle_frame:<avdec_wmav2-0> Received new data of size 2304, offset:18446744073709551615, ts:99:99:99.999999999, dur:99:99:99.999999999 0:00:01.995726965 79629 0xca7830 LOG GST_BUFFER gstbuffer.c:1797:gst_buffer_map_range: buffer 0xc985a0, idx 0, length -1, flags 0001 0:00:01.995733424 79629 0xca7830 LOG GST_BUFFER gstbuffer.c:241:_get_merged_memory: buffer 0xc985a0, idx 0, length 1 0:00:01.995753881 79629 0xca7830 LOG libav gstavauddec.c:697:gst_ffmpegauddec_handle_frame:<avdec_wmav2-0> resized padding buffer to 2368 0:00:01.995841577 79629 0xca7830 ERROR libav :0:: next_block_len_bits 4 out of range 0:00:01.995857787 79629 0xca7830 WARN libav gstavauddec.c:756:gst_ffmpegauddec_handle_frame:<avdec_wmav2-0> decoding error 0:00:01.995864472 79629 0xca7830 LOG audiodecoder gstaudiodecoder.c:1710:gst_audio_decoder_push_buffers:<avdec_wmav2-0> done pushing to subclass 0:00:01.995870395 79629 0xca7830 LOG audiodecoder gstaudiodecoder.c:1815:gst_audio_decoder_chain_forward:<avdec_wmav2-0> chain-done 0:00:01.995879276 79629 0xca7830 DEBUG GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<avdec_wmav2-0:sink> called chainfunction &gst_audio_decoder_chain with buffer 0xc985a0, returned ok 0:00:01.995889881 79629 0xca7830 DEBUG GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<typefind:sink> called chainfunction &gst_type_find_element_chain with buffer 0xc985a0, returned ok 0:00:01.995900275 79629 0xca7830 DEBUG GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<decodebin0:sink> called chainfunction &gst_proxy_pad_chain_default with buffer 0xc985a0, returned ok 0:00:01.995915997 79629 0xca7830 DEBUG appsink gstappsink.c:1644:gst_app_sink_try_pull_sample:<appsink0> trying to grab a buffer 0:00:01.995924012 79629 0xca7830 DEBUG appsink gstappsink.c:1655:gst_app_sink_try_pull_sample:<appsink0> waiting for a buffer 0:00:01.995931875 79629 0xca7830 DEBUG appsink gstappsink.c:1692:gst_app_sink_try_pull_sample:<appsink0> timeout expired, return NULL ``` Looks like libav isn't prepared to handle this data, so it's out of FAudio's hands. I was able to verify that our data from FACT is otherwise valid, so at this point it's running source voices correctly but cannot be decoded without a fix from the plugin.
GloriousEggroll commented 2020-08-17 12:57:47 -05:00 (Migrated from github.com)

I have my build configured to build gst-libav, if we can figure out a patch to fix it i can test easily

I have my build configured to build gst-libav, if we can figure out a patch to fix it i can test easily
flibitijibibo commented 2021-04-20 09:23:24 -05:00 (Migrated from github.com)

Doing a bit of spring cleaning...

Closing as NOTOURBUG - WMA issues with libav should be filed with that project; at this point my only real data is going to come from protonmediaconverter so this is effectively abandoned.

Doing a bit of spring cleaning... Closing as NOTOURBUG - WMA issues with libav should be filed with that project; at this point my only real data is going to come from protonmediaconverter so this is effectively abandoned.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-FNA-XNA/FAudio#184
No description provided.