@override Object toJson() { return { if (sampleRate.isNotDefault) 'sampleRate': encodeDouble(sampleRate), }; }