fromProto static method

AudioEventMessage fromProto(
  1. Message proto
)

Implementation

static AudioEventMessage fromProto(audio_events_pb.Message proto) {
  return switch (proto.whichEvent()) {
    audio_events_pb.Message_Event.inputClipped =>
      AudioEventInputClippedProtoEx.fromProto(proto.inputClipped),
    audio_events_pb.Message_Event.outputClipped =>
      AudioEventOutputClippedProtoEx.fromProto(proto.outputClipped),
    audio_events_pb.Message_Event.notSet => throw ProtoException(),
  };
}