forked from FNA-XNA/FAudio
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from FNA-XNA:master #2
Open
pull
wants to merge
194
commits into
devcode1981:master
Choose a base branch
from
FNA-XNA:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes parsing for big-endian SoundBanks.
Fixes parsing for big-endian SoundBanks.
Fixes parsing for big-endian SoundBanks
incorrect frequency and q variation calculations. Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
Even with the engine procedure callback, Wine has to swap it to another thread in order for the application-provided callbacks to be executed in the context of a Wine thread, and not the SDL audio created thread. This will also allow Wine get rid of the FAudio SDL2 dependency, which is desirable, considering we'll ultimately need FAudio built as PE.
We might overflow the read buffer otherwise.
Add an ALIGN(type, boundary) macro with an MSVC equivalent using __declspec(align(x)) to the gcc/clang-specific __attribute__((aligned(x))). Fallback to no alignment for other compilers. Link system DLLs on Windows by name instead of as an -l linker flag, cmake automatically produces the correct linker invocation on both MINGW and MSVC. Include <windows.h> with WIN32_LEAN_AND_MEAN defined instead of including <windef.h> and <winbase.h>, because this breaks the Windows header architecture detection on MSVC. Define the GUIDs for IID_IAudioClient, IID_IAudioRenderClient, IID_IMMDeviceEnumerator and CLSID_MMDeviceEnumerator for PLATFORM_WIN32 taken from the SDK headers, because MSVC cannot find the linkage for them. Define them only for MSVC because MINGW throws a redeclaration error. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This is a followup on 81d5a24 (build: fix building with MSVC, 2024-03-07). Fix the missing trailing _ in __attribute__ for __attribute((aligned(x))). Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This is a followup on 81d5a24 (build: fix building with MSVC, 2024-03-07) and 68a555e (build: fix __attribute__((aligned(x))) on gcc/clang, 2024-03-09) for the purposes of creating a vcpkg FAudio port. Add a `Requires.private: sdl2` to the pkgconf file for the SDL2 dependency when not using PLATFORM_WIN32. Add the SDL2 dependency to the generated cmake config file when not using PLATFORM_WIN32 as well. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Deadlock was being caused by the fact that some private FAudio routines hold internal mutexes while calling application callbacks. This may result in a deadlock because app might have a huge global mutex that is locked both by callbacks and by some code that e.g. submits new buffers to XAudio. Should fix https://bugs.winehq.org/show_bug.cgi?id=54246
This caused some issues with streaming audio playback in FNA. This reverts commit a623edb.
And don't crash if the computer doesn't have any audio devices. Fixes #347
Deadlock was being caused by the fact that some private FAudio routines hold internal mutexes while calling application callbacks. This may result in a deadlock because app might have a huge global mutex that is locked both by callbacks and by some code that e.g. submits new buffers to XAudio. Should fix https://bugs.winehq.org/show_bug.cgi?id=54246
Now that we release buffer lock before executing callbacks, some code from another thread can get scheduled between mutex unlock and callback call and observe empty buffer queue right before callback puts a new buffer there. XNA_Song determines the end of the song by simply checking if the queue is empty, which may lead to random playback breaks. Not sure how to properly check for the song end but the buffer decoding function also zeroes out total samples counter when it finishes a EOS-flagged buffer so checking if that counter is zero should cut it... probably?
Previously, we would crash when the audio device was disconnected.
Previously, FAudio with `PLATFORM_WIN32` would only list the default audio device. This reworks the FAudio `PLATFORM_WIN32` code to enable access to every audio device on the system. In order to preserve the existing behavior (and XAudio2 compabitility), the audio devices are re-ordered so the first device is always the default one. In addition: * Properly populates the `DisplayName` field in `FAudioDeviceDetails`. Previously, it was set to the device GUID. * [windows] Return error code for DefaultDeviceIndex * Rework `FAudio_DefaultDeviceIndex` to return the Windows API error code and take the `defaultDeviceIndex` as parameter. Test: Local build with visualboyadvance-m
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )