All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.android.emulator.control.AudioFormat Maven / Gradle / Ivy

There is a newer version: 0.5.8
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: emulator_controller.proto

// Protobuf Java Version: 3.25.0
package com.android.emulator.control;

/**
 * Protobuf type {@code android.emulation.control.AudioFormat}
 */
public  final class AudioFormat extends
    com.google.protobuf.GeneratedMessageLite<
        AudioFormat, AudioFormat.Builder> implements
    // @@protoc_insertion_point(message_implements:android.emulation.control.AudioFormat)
    AudioFormatOrBuilder {
  private AudioFormat() {
  }
  /**
   * Protobuf enum {@code android.emulation.control.AudioFormat.SampleFormat}
   */
  public enum SampleFormat
      implements com.google.protobuf.Internal.EnumLite {
    /**
     * 
     * Unsigned 8 bit
     * 
* * AUD_FMT_U8 = 0; */ AUD_FMT_U8(0), /** *
     * Signed 16 bit (little endian)
     * 
* * AUD_FMT_S16 = 1; */ AUD_FMT_S16(1), UNRECOGNIZED(-1), ; /** *
     * Unsigned 8 bit
     * 
* * AUD_FMT_U8 = 0; */ public static final int AUD_FMT_U8_VALUE = 0; /** *
     * Signed 16 bit (little endian)
     * 
* * AUD_FMT_S16 = 1; */ public static final int AUD_FMT_S16_VALUE = 1; @java.lang.Override public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SampleFormat valueOf(int value) { return forNumber(value); } public static SampleFormat forNumber(int value) { switch (value) { case 0: return AUD_FMT_U8; case 1: return AUD_FMT_S16; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< SampleFormat> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { @java.lang.Override public SampleFormat findValueByNumber(int number) { return SampleFormat.forNumber(number); } }; public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier() { return SampleFormatVerifier.INSTANCE; } private static final class SampleFormatVerifier implements com.google.protobuf.Internal.EnumVerifier { static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new SampleFormatVerifier(); @java.lang.Override public boolean isInRange(int number) { return SampleFormat.forNumber(number) != null; } }; private final int value; private SampleFormat(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:android.emulation.control.AudioFormat.SampleFormat) } /** * Protobuf enum {@code android.emulation.control.AudioFormat.Channels} */ public enum Channels implements com.google.protobuf.Internal.EnumLite { /** * Mono = 0; */ Mono(0), /** * Stereo = 1; */ Stereo(1), UNRECOGNIZED(-1), ; /** * Mono = 0; */ public static final int Mono_VALUE = 0; /** * Stereo = 1; */ public static final int Stereo_VALUE = 1; @java.lang.Override public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Channels valueOf(int value) { return forNumber(value); } public static Channels forNumber(int value) { switch (value) { case 0: return Mono; case 1: return Stereo; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Channels> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { @java.lang.Override public Channels findValueByNumber(int number) { return Channels.forNumber(number); } }; public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier() { return ChannelsVerifier.INSTANCE; } private static final class ChannelsVerifier implements com.google.protobuf.Internal.EnumVerifier { static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new ChannelsVerifier(); @java.lang.Override public boolean isInRange(int number) { return Channels.forNumber(number) != null; } }; private final int value; private Channels(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:android.emulation.control.AudioFormat.Channels) } public static final int SAMPLINGRATE_FIELD_NUMBER = 1; private long samplingRate_; /** *
   * Sampling rate to use, defaulting to 44100 if this is not set.
   * Note, that android devices typically will not use a sampling
   * rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
   * 
* * uint64 samplingRate = 1; * @return The samplingRate. */ @java.lang.Override public long getSamplingRate() { return samplingRate_; } /** *
   * Sampling rate to use, defaulting to 44100 if this is not set.
   * Note, that android devices typically will not use a sampling
   * rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
   * 
* * uint64 samplingRate = 1; * @param value The samplingRate to set. */ private void setSamplingRate(long value) { samplingRate_ = value; } /** *
   * Sampling rate to use, defaulting to 44100 if this is not set.
   * Note, that android devices typically will not use a sampling
   * rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
   * 
* * uint64 samplingRate = 1; */ private void clearSamplingRate() { samplingRate_ = 0L; } public static final int CHANNELS_FIELD_NUMBER = 2; private int channels_; /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @return The enum numeric value on the wire for channels. */ @java.lang.Override public int getChannelsValue() { return channels_; } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @return The channels. */ @java.lang.Override public com.android.emulator.control.AudioFormat.Channels getChannels() { com.android.emulator.control.AudioFormat.Channels result = com.android.emulator.control.AudioFormat.Channels.forNumber(channels_); return result == null ? com.android.emulator.control.AudioFormat.Channels.UNRECOGNIZED : result; } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @param value The enum numeric value on the wire for channels to set. */ private void setChannelsValue(int value) { channels_ = value; } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @param value The channels to set. */ private void setChannels(com.android.emulator.control.AudioFormat.Channels value) { channels_ = value.getNumber(); } /** * .android.emulation.control.AudioFormat.Channels channels = 2; */ private void clearChannels() { channels_ = 0; } public static final int FORMAT_FIELD_NUMBER = 3; private int format_; /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @return The enum numeric value on the wire for format. */ @java.lang.Override public int getFormatValue() { return format_; } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @return The format. */ @java.lang.Override public com.android.emulator.control.AudioFormat.SampleFormat getFormat() { com.android.emulator.control.AudioFormat.SampleFormat result = com.android.emulator.control.AudioFormat.SampleFormat.forNumber(format_); return result == null ? com.android.emulator.control.AudioFormat.SampleFormat.UNRECOGNIZED : result; } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @param value The enum numeric value on the wire for format to set. */ private void setFormatValue(int value) { format_ = value; } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @param value The format to set. */ private void setFormat(com.android.emulator.control.AudioFormat.SampleFormat value) { format_ = value.getNumber(); } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; */ private void clearFormat() { format_ = 0; } public static com.android.emulator.control.AudioFormat parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.android.emulator.control.AudioFormat parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.android.emulator.control.AudioFormat parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.android.emulator.control.AudioFormat parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.android.emulator.control.AudioFormat parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.android.emulator.control.AudioFormat parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.android.emulator.control.AudioFormat parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.android.emulator.control.AudioFormat parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.android.emulator.control.AudioFormat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.android.emulator.control.AudioFormat parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.android.emulator.control.AudioFormat parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.android.emulator.control.AudioFormat parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.android.emulator.control.AudioFormat prototype) { return DEFAULT_INSTANCE.createBuilder(prototype); } /** * Protobuf type {@code android.emulation.control.AudioFormat} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.android.emulator.control.AudioFormat, Builder> implements // @@protoc_insertion_point(builder_implements:android.emulation.control.AudioFormat) com.android.emulator.control.AudioFormatOrBuilder { // Construct using com.android.emulator.control.AudioFormat.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     * Sampling rate to use, defaulting to 44100 if this is not set.
     * Note, that android devices typically will not use a sampling
     * rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
     * 
* * uint64 samplingRate = 1; * @return The samplingRate. */ @java.lang.Override public long getSamplingRate() { return instance.getSamplingRate(); } /** *
     * Sampling rate to use, defaulting to 44100 if this is not set.
     * Note, that android devices typically will not use a sampling
     * rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
     * 
* * uint64 samplingRate = 1; * @param value The samplingRate to set. * @return This builder for chaining. */ public Builder setSamplingRate(long value) { copyOnWrite(); instance.setSamplingRate(value); return this; } /** *
     * Sampling rate to use, defaulting to 44100 if this is not set.
     * Note, that android devices typically will not use a sampling
     * rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
     * 
* * uint64 samplingRate = 1; * @return This builder for chaining. */ public Builder clearSamplingRate() { copyOnWrite(); instance.clearSamplingRate(); return this; } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @return The enum numeric value on the wire for channels. */ @java.lang.Override public int getChannelsValue() { return instance.getChannelsValue(); } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @param value The channels to set. * @return This builder for chaining. */ public Builder setChannelsValue(int value) { copyOnWrite(); instance.setChannelsValue(value); return this; } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @return The channels. */ @java.lang.Override public com.android.emulator.control.AudioFormat.Channels getChannels() { return instance.getChannels(); } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @param value The enum numeric value on the wire for channels to set. * @return This builder for chaining. */ public Builder setChannels(com.android.emulator.control.AudioFormat.Channels value) { copyOnWrite(); instance.setChannels(value); return this; } /** * .android.emulation.control.AudioFormat.Channels channels = 2; * @return This builder for chaining. */ public Builder clearChannels() { copyOnWrite(); instance.clearChannels(); return this; } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @return The enum numeric value on the wire for format. */ @java.lang.Override public int getFormatValue() { return instance.getFormatValue(); } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @param value The format to set. * @return This builder for chaining. */ public Builder setFormatValue(int value) { copyOnWrite(); instance.setFormatValue(value); return this; } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @return The format. */ @java.lang.Override public com.android.emulator.control.AudioFormat.SampleFormat getFormat() { return instance.getFormat(); } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @param value The enum numeric value on the wire for format to set. * @return This builder for chaining. */ public Builder setFormat(com.android.emulator.control.AudioFormat.SampleFormat value) { copyOnWrite(); instance.setFormat(value); return this; } /** * .android.emulation.control.AudioFormat.SampleFormat format = 3; * @return This builder for chaining. */ public Builder clearFormat() { copyOnWrite(); instance.clearFormat(); return this; } // @@protoc_insertion_point(builder_scope:android.emulation.control.AudioFormat) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.android.emulator.control.AudioFormat(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "samplingRate_", "channels_", "format_", }; java.lang.String info = "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0003\u0002\f" + "\u0003\f"; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.android.emulator.control.AudioFormat.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser( DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:android.emulation.control.AudioFormat) private static final com.android.emulator.control.AudioFormat DEFAULT_INSTANCE; static { AudioFormat defaultInstance = new AudioFormat(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( AudioFormat.class, defaultInstance); } public static com.android.emulator.control.AudioFormat getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy