bindings/go-duplex: add support for switching codecs