View Source NxAudio.Visualizations.WaveConfig (nx_audio v0.2.0)

Defines the configuration schema for the Waveform visualization.

Summary

Types

t()

Functions

Validates the given configuration options and returns the parsed configuration.

Types

t()

@type t() :: [
  width: non_neg_integer(),
  height: non_neg_integer(),
  color: term(),
  background: term()
]
  • :width (non_neg_integer/0) - Chart width in pixels. The default value is 800.

  • :height (non_neg_integer/0) - Chart height in pixels. The default value is 600.

  • :color - Color of the waveform. The default value is :steelblue.

  • :background - Background color. The default value is :white.

Functions

validate!(config)

@spec validate!(backend_options :: Keyword.t()) :: t()

Validates the given configuration options and returns the parsed configuration.