RunningWaveForm
A stateful composable that creates a "waveform" visualizer used to display mic input during recording. You should poll the amplitude of the audio input and update the composable's latestValue input when each new value is emitted. Null values are ignored.
Since the composable is stateful, restartKey is used to remember the state. If you want to reset the composable's state simply pass in a new key.
Parameters
Used to reset the state of the composable when a value different to the previous value is passed in.
Should be incremented upon every new latestValue. Used so that if the same latestValue is posted twice in a valid way, we add a new bar for each emission.
Represents the latest value from the audio input. The composable will draw a new bar for each latest value passed in.
Modifier for styling.
The maximum amplitude of the input. A latestValue equaling maxInputValue will result in the bar height equaling the height of the whole composable.
Minimum bar height, expressed as a percentage of the complete height of the composable.
The width of a single bar representing audio input.
The gap between two bars.
The corner radius if the bars.
The brush used to outline the bars.