# Spec: Multi-Device Equalizer ## New Capability: audio-device-detection ### Purpose Platform channel bridge that enumerates current audio output devices and streams change events to Dart. Enables the rest of the system to react to device connect/disconnect without polling. ### Requirements #### Requirement: Device enumeration on demand The system MUST expose a synchronous query that returns the list of currently connected audio output devices as a typed list of device IDs. ##### Scenario: enumerate at startup — Android - GIVEN the feature toggle is enabled - WHEN `ServicioDispositivoAudio.dispositivosActuales()` is called on Android - THEN it MUST return a list where each entry has a stable `deviceId` string - AND built-in speaker MUST appear as `"builtin_speaker"` - AND BT A2DP devices MUST appear as `"bt_a2dp:"` - AND USB audio MUST appear as `"usb_headset:
"` - AND wired headset MUST appear as `"wired_headset"` ##### Scenario: enumerate at startup — iOS - GIVEN the feature toggle is enabled - WHEN `ServicioDispositivoAudio.dispositivosActuales()` is called on iOS - THEN it MUST return at least the active route output - AND the `deviceId` MUST be stable within the session using `portType+uid` - AND calling it again before a route change MUST return the same IDs ##### Scenario: enumerate when toggle is disabled - GIVEN the feature toggle is disabled - WHEN any method of `ServicioDispositivoAudio` is called - THEN it MUST return an empty list and an empty stream without errors --- (See Engram observation #2186 for complete spec with all 27 requirement scenarios)