Skip to content

Critical Audio Initialization Failure on Linux (Proton/Wine) – "Failed to set up resampler" despite 48kHz setting #372

@AndreasHupfer

Description

@AndreasHupfer

Description

When attempting to initialize audio input or output in the Swift Client (v0.15-64bit) using any configured device (e.g., USB Sound Blaster Play! 3, or system default devices), the application consistently fails with the error message: "Failed to set up resampler".

This failure occurs immediately after the application requests to open the audio stream and prevents the application from connecting to the VATSIM network, as audio devices cannot be selected.

Environment Details

  • Operating System: Linux (Distribution Nobara, but uses PipeWire/PulseAudio)
  • Virtualization/Compatibility Layer: Steam Proton / Wine (Tested with Proton GE and Official Valve versions)
  • Swift Client Version: v0.15-64bit
  • Affected Device: USB Sound Blaster Play! 3 (or any other device)
  • Critical Log Observation: The uploaded log confirms that Swift is correctly requesting the standard Linux sample rate of 48000 Hz for both input and output, which means no resampling should be necessary.

Log Snippet confirming 48kHz request (Example):
Starting: 'USB Audio S/PDIF Output' with: Sample rate: 48000 channels: 1 sample format: 4 bytes/frame: 4
Immediately followed by:
Failed to set up resampler
Troubleshooting Steps Attempted (Failed to resolve issue)
The following extensive configuration and runner changes were attempted without success:

1. Configuration and Environment Variables

  • Manual Sample Rate Check: Confirmed in setup.json that the client requests 48000 Hz for the audio stream, confirming the resampler is failing unnecessarily.
  • Forcing PulseAudio Latency: Increased the PulseAudio latency environment variable to address potential timing issues:
  • PULSE_LATENCY_MSEC=80 and PULSE_LATENCY_MSEC=100
  • Forcing PulseAudio Properties (Format): Explicitly setting the stream format to prevent format negotiation issues:
    WINE_PULSE_PROPERTIES="rate=48000 channels=1"
  • Combined Fix: Running the client with both latency and properties set simultaneously.

2. Driver and DLL Overrides (protontricks)
Forcing ALSA Driver: Attempting to force the older ALSA driver (via protontricks 2537590 winetricks settings sound=alsa), which resulted in the Sound Blaster device becoming invisible and did not resolve the underlying resampler error.
Reverting to PulseAudio: Reverting the sound setting to PulseAudio (protontricks 2537590 settings sound=pulse) to re-enable device visibility.
Installing Audio Runtimes: Installed specialized audio libraries to replace Wine's default implementation:

protontricks 2537590 faudio
protontricks 2537590 dsound ( DirectSound)

3. Proton Runner Switching
Manual Runner Switching Failure: Direct calls to run the client with different Proton versions (e.g., Proton Experimental) failed due to prefix context errors (Proton: No compat data path?).

Clean Slate Installation: The original, potentially corrupt Wine prefix was destroyed (protontricks 2537590 annihilate). The client was reinstalled into a clean, newly created prefix initialized with Proton Experimental (the best-patched runner), which still did not resolve the resampler failure upon first run.

Expected Result
The Swift Client should successfully open the audio stream using the requested 48000 Hz sample rate without attempting to invoke the failing resampler component, allowing the user to select input/output devices and connect to VATSIM.

Proposed Analysis
The persistent failure across all configurations suggests a fundamental bug within the Qt Multimedia framework's implementation of stream initialization under the Wine/Proton environment, which misinterprets the 48kHz stream request and erroneously attempts (and fails) to set up its internal resampler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions