Map<String, dynamic> toJson() => { 'gainType': gainType.index, 'audioAttribute': audioAttributes?.toJson(), 'willPauseWhenDucked': willPauseWhenDucked, };