Skip to content

[Linux/macOS][Audio] Aircraft selection voice lines are not playing (static only) #129

Description

@fbraz3

Summary

When selecting aircraft units (or issuing commands to them), voice lines are not played; in many cases only radio/static SFX can be heard.

This affects the cross-platform builds (Linux and macOS).

Context / Evidence

Relevant Code Areas

  • ThingTemplate voice mappings (including VoiceSelect and VoiceAttackAir):
    • GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingTemplate.cpp
    • GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h
  • Selection/command path that triggers unit voice:
    • GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
  • OpenAL backend (voice rules, priority, loop/disallow speech):
    • Core/GameEngineDevice/Source/OpenALAudioDevice/OpenALAudioManager.cpp

Initial Hypotheses

  1. The correct aircraft voice event is constructed, but dropped by OpenAL manager priority/limit/channel rules.
  2. Play-portion switching (PP_Attack/PP_Sound) suppresses the voice portion for some aircraft events.
  3. Regression inherited from fighter19 upstream in ST_VOICE handling.
  4. Behavior difference between dynamic air voice events and ground voice events due to incomplete AudioEventInfo or incorrect fallback.

Reproduction Steps (proposed)

  1. Run on Linux and macOS with a simple mission/skirmish.
  2. Produce aircraft units (e.g., Comanche, Raptor, MiG) and select repeatedly.
  3. Issue move/attack commands and compare to equivalent ground units.
  4. Verify whether only static plays and voice never starts.

Expected Result

Aircraft selection/command voice lines should play normally (not static-only), consistently on Linux and macOS.

Current Result

Aircraft voice lines are missing or intermittent; static SFX is present.

Investigation Checklist

  • Instrument CommandXlat to confirm selected voice-event name for aircraft.
  • Instrument OpenALAudioManager::playAudioEvent and priority/limit checks for ST_VOICE events.
  • Verify effective AudioEventInfo (type, priority, soundType, control flags) for aircraft voice events.
  • Compare behavior against fighter19 upstream issue 86.
  • Run regression check with ground-unit voice as control.

Acceptance Criteria

  • Aircraft selection/command voice plays correctly on Linux.
  • Aircraft selection/command voice plays correctly on macOS.
  • No visible regression in ground-unit voice playback.
  • No replay/determinism impact (changes restricted to platform/audio backend).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions