CNA-VGAP-005: The XNA audio facade on CNA's own ALSA mixer is covered by seven facade tests plus the XACT category suite; the SoundEffect, instance, dynamic-instance, Cue, SoundBank and WaveBank suites run only on SDL3

CNA snapshot 009d40f5  ·  Known Issues › Verification gaps  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

Under CNA_AUDIO_PLATFORM=ALSA, eight SDL3_mixer-bound suites (about 440 test definitions) are filtered out, so SoundEffect, SoundEffectInstance and DynamicSoundEffectInstance behaviour on CNA's mixer rests on seven facade cases, and Cue, SoundBank and WaveBank playback on the twelve AudioCategoryTests cases that play cues from real banks.

Identifier
CNA-VGAP-005
Category
Verification gap
Subsystem
Audio & media
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
Microsoft::Xna::Framework::Audio (SoundEffect, SoundEffectInstance, DynamicSoundEffectInstance, AudioEngine, Cue, SoundBank, WaveBank) under CNA_AUDIO_PLATFORM=ALSA

Expected behaviour

Both implementations behind MixerEngine.hpp (SDL3_mixer for SDL3 audio, CNA's own mixer for ALSA) serve the same public audio contract, so the evidence for that contract should reach both. On SDL3 it is carried by the facade suites: by TEST macro count at TARGET, SoundEffectInstanceTests 133, CueTests 92, SoundEffectTests 61, DynamicSoundEffectInstanceTests 57, WaveBankTests 38, SoundBankTests 36, OfflineAudioRendererTests 17 and AudioMixerTests 8.

Actual behaviour at TARGET

  • UnitTests.cmake removes those eight suites from CnaTests for every non-SDL3 audio selection, because they read SDL3_mixer's own track handles. For ALSA it keeps AudioCategoryTests. What exercises the XNA facade on CNA's mixer is therefore CnaMixerXnaTests.cpp (seven cases: a fire-and-forget play, an instance playing for its duration, pause/resume/stop, a looped instance, a dynamic instance consuming buffers, which file formats load, and one end-to-end recording through ALSA's file device), CnaMixerTests.cpp (24 mixer-level cases), AudioCategoryTests (28 cases, twelve of which play cues from real SoundBank fixtures, nine with WaveBank-backed instances, and check pause, resume, stop, volume and instance-limit eviction through the public API), the microphone suites and one ALSA-only MediaPlayer song-end case. Not exercised on ALSA: Apply3D and the pan crossfeed, pitch, authored loop regions, the 3D-versus-pan gate, instance state edge cases, the behaviour the dedicated CueTests, SoundBankTests and WaveBankTests pin (RPC curves, variations, wave formats, streaming reads, fire-and-forget sweeping) and the offline renderer.
  • The X11 + ALSA cell of platform-ci.yml builds only CnaAudioTests and runs a filtered selection on ALSA's silent null device. The filter (CnaMixer.*, CnaMixerXna.*, AlsaAudioDevice.*, AlsaAudioRecordingDevice.*, Microphone*, AudioCategory*, *AudioDeviceConformanceTests*, AudioEngine*, RendererDetail*) does not match the CnaMixerXnaRecording suite, so the recording case runs only under ctest's CnaAudioAlsaRecordingTest, and the ALSA-only MediaPlayer case lives in the media test binary that this cell does not build. No lane plays to a physical sound card.

Source locations

Evidence

Checked by reading at 009d40f5; no test was run. Test counts are TEST/TEST_F/TEST_P definitions counted in the source files, not executed cases. Nothing is known to be wrong on the ALSA mixer; the gap is the missing evidence.

Independent re-verification: Checked by reading at 009d40f5; no test was run. Test counts are TEST/TEST_F/TEST_P definitions counted in the source files, not executed cases (133, 92, 61, 57, 38, 36, 17 and 8 for the eight excluded suites, 7 for CnaMixerXnaTests, 24 for CnaMixerTests, 28 for AudioCategoryTests). Nothing is known to be wrong on the ALSA mixer; the gap is the missing evidence.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

As listed above. The SDL3 suites observe track state through SDL3_mixer handles (for example SoundEffectInstanceTestAccess), which is why they cannot compile against CNA's mixer.

Regression test

Move the facade assertions onto the backend-neutral MixerEngine.hpp queries (track playing, paused, gain, frequency ratio) so the same suites build for SDL3 and ALSA, and add them to the ALSA CI filter; or add an ALSA twin for each behaviour group listed above.

Blast radius

SDL-free X11 builds that select CNA_AUDIO_PLATFORM=ALSA. SDL3 audio builds are unaffected.

Workaround

No workaround is known.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.