Initial audio support
This commit is contained in:
@@ -19,6 +19,7 @@ function App() {
|
||||
const performance = appState?.performance ?? {};
|
||||
const runtime = appState?.runtime ?? {};
|
||||
const video = appState?.video ?? {};
|
||||
const audio = appState?.audio ?? {};
|
||||
const app = appState?.app ?? {};
|
||||
const stackPresets = appState?.stackPresets ?? [];
|
||||
|
||||
@@ -67,7 +68,7 @@ function App() {
|
||||
</header>
|
||||
|
||||
<section className="dashboard-grid">
|
||||
<StatusPanels app={app} performance={performance} runtime={runtime} video={video} />
|
||||
<StatusPanels app={app} audio={audio} performance={performance} runtime={runtime} video={video} />
|
||||
<StackPresetToolbar
|
||||
presetName={presetName}
|
||||
selectedPresetName={selectedPresetName}
|
||||
|
||||
@@ -4,7 +4,7 @@ function formatNumber(value, digits = 3) {
|
||||
return Number(value ?? 0).toFixed(digits);
|
||||
}
|
||||
|
||||
export function StatusPanels({ app, performance, runtime, video }) {
|
||||
export function StatusPanels({ app, audio, performance, runtime, video }) {
|
||||
return (
|
||||
<>
|
||||
<div className="panel panel--runtime">
|
||||
@@ -36,6 +36,21 @@ export function StatusPanels({ app, performance, runtime, video }) {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="panel panel--audio">
|
||||
<h2>Audio</h2>
|
||||
<KvList
|
||||
values={[
|
||||
["Enabled", audio.enabled ? "On" : "Off"],
|
||||
["Sample Rate", `${app.audioSampleRate || 0} Hz`],
|
||||
["Channels", `${app.audioChannelCount || 0}`],
|
||||
["Buffered", `${audio.bufferedSampleFrames || 0} samples`],
|
||||
["Underruns", `${audio.underrunCount || 0}`],
|
||||
["RMS L/R", `${formatNumber(audio.rms?.[0], 3)} / ${formatNumber(audio.rms?.[1], 3)}`],
|
||||
["Peak L/R", `${formatNumber(audio.peak?.[0], 3)} / ${formatNumber(audio.peak?.[1], 3)}`],
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="panel panel--compiler">
|
||||
<h2>Compiler</h2>
|
||||
<pre>{runtime.compileMessage || "No compiler output."}</pre>
|
||||
|
||||
Reference in New Issue
Block a user