Scripting API

Scripting API

AudioEncoding

Record struct in Abyss.Core, from Abyss.Core.

How a sound clip is encoded as the editor imports it: its Compression Format, Vorbis's Quality, a lower Sample Rate and Force To Mono. As Encoded, a clip is not imported, and is played and packed as its file encodes it.

public readonly record struct AudioEncoding

Constructors

AudioEncoding

public AudioEncoding(AudioCompression Compression, int Quality, int SampleRate, bool ForceToMono)

How a sound clip is encoded as the editor imports it: its Compression Format, Vorbis's Quality, a lower Sample Rate and Force To Mono. As Encoded, a clip is not imported, and is played and packed as its file encodes it.

Parameters

  • Compression: How it is encoded.
  • Quality: Vorbis's quality, from 1 to 100; read for Vorbis alone.
  • SampleRate: The sample rate it is lowered to, in hertz; zero keeps its own, as does one no lower than it.
  • ForceToMono: Whether it is mixed to one channel.

Properties

Compression

public AudioCompression Compression { get; init; }

How it is encoded.

Quality

public int Quality { get; init; }

Vorbis's quality, from 1 to 100; read for Vorbis alone.

SampleRate

public int SampleRate { get; init; }

The sample rate it is lowered to, in hertz; zero keeps its own, as does one no lower than it.

ForceToMono

public bool ForceToMono { get; init; }

Whether it is mixed to one channel.

Default

public static AudioEncoding Default { get; }

A clip nobody configured: as its file encodes it, its own sample rate and channels.

Imports

public bool Imports { get; }

Whether it is imported: a format other than As Encoded.

AsksInVain

public bool AsksInVain { get; }

Whether it asks for what only an import makes — mono, a lower sample rate — and is As Encoded, so it makes none of it.

Methods

Made

public AudioEncoding Made()

It as far as it changes what an import makes: its quality only for Vorbis.

Constants

LeastQuality

public const int LeastQuality = 1

The lowest quality.

MostQuality

public const int MostQuality = 100

The highest quality.

DefaultQuality

public const int DefaultQuality = 70

What a clip's quality is until it is set.

MostSampleRate

public const int MostSampleRate = 384000

The highest sample rate a clip can be said to be lowered to.