Introduce multi-device EQ support allowing each audio output device (built-in speaker, wired, USB, individual Bluetooth by MAC) to have its own equalizer preset, combined with existing per-station presets for a full station×device matrix. - Add DispositivoAudio model and ServicioDispositivoAudio interface - Add Android platform channel (AudioDeviceCallback) for device detection - Add iOS AudioDevicesPlugin (AVAudioSession route tracking) - Extend ServicioEcualizador with device and matrix persistence keys - Implement 4-level resolution: matrix > station > device > global - Add advanced EQ settings section with feature toggle (off by default) - Extend export/import to v3 with backward compatibility - 184 tests passing, zero analyzer issues
48 lines
1.1 KiB
Dart
48 lines
1.1 KiB
Dart
/// Audio device types detected via platform channel.
|
|
enum TipoDispositivo {
|
|
/// Built-in speaker — id: "builtin_speaker"
|
|
altavozInterno,
|
|
|
|
/// Wired headset or headphones — id: "wired_headset"
|
|
auricularesCable,
|
|
|
|
/// Bluetooth A2DP device — id: `"bt_a2dp:<MAC>"`
|
|
bluetoothA2dp,
|
|
|
|
/// USB audio device — id: `"usb_headset:<address>"`
|
|
usbAudio,
|
|
|
|
/// Unrecognized device type.
|
|
desconocido,
|
|
}
|
|
|
|
/// Represents an audio output device detected on the current platform.
|
|
///
|
|
/// Equality is based on [id] only so that two instances referring to the
|
|
/// same physical device compare as equal regardless of display name.
|
|
class DispositivoAudio {
|
|
final String id;
|
|
final TipoDispositivo tipo;
|
|
final String nombre;
|
|
|
|
const DispositivoAudio({
|
|
required this.id,
|
|
required this.tipo,
|
|
required this.nombre,
|
|
});
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
if (identical(this, other)) return true;
|
|
if (other is! DispositivoAudio) return false;
|
|
return id == other.id;
|
|
}
|
|
|
|
@override
|
|
int get hashCode => id.hashCode;
|
|
|
|
@override
|
|
String toString() =>
|
|
'DispositivoAudio(id: $id, tipo: $tipo, nombre: $nombre)';
|
|
}
|