Table of Contents

Struct ResponseFormat

Namespace
Mabs.AudioCpp.Models
Assembly
AudioCpp.dll

A response_format value. The wire type is a string; use the static instances or construct from any string the server accepts (an unknown value is rejected by the server).

public readonly struct ResponseFormat : IEquatable<ResponseFormat>
Implements
Inherited Members

Constructors

ResponseFormat(string)

Creates a format from its wire string.

public ResponseFormat(string value)

Parameters

value string

The wire string, e.g. wav.

Fields

Json

JSON object carrying Base64 WAV.

public static readonly ResponseFormat Json

Field Value

ResponseFormat

Mp3

MP3 bytes (only builds with the mp3_encode frontend module).

public static readonly ResponseFormat Mp3

Field Value

ResponseFormat

Pcm

Raw PCM16 bytes.

public static readonly ResponseFormat Pcm

Field Value

ResponseFormat

Wav

WAV bytes (default).

public static readonly ResponseFormat Wav

Field Value

ResponseFormat

Properties

Value

The wire string.

public string Value { get; }

Property Value

string

Methods

Equals(ResponseFormat)

public bool Equals(ResponseFormat other)

Parameters

other ResponseFormat

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

implicit operator string(ResponseFormat)

Implicit conversion to string.

public static implicit operator string(ResponseFormat format)

Parameters

format ResponseFormat

The format.

Returns

string

The wire string.

implicit operator ResponseFormat(string)

Implicit conversion from string.

public static implicit operator ResponseFormat(string value)

Parameters

value string

The wire string.

Returns

ResponseFormat

The format.