fix: property inspector - always show channels/sample rate, show 'default' if unknown
- Removed duplicated/broken code from property parsing - Always shows Channels and Sample Rate for audio nodes - Shows 'default' if sample rate not available on node - Latency shows ms calculation when sample rate known - Added fallback: clock.rate, api.alsa.rate
This commit is contained in:
@@ -690,10 +690,12 @@
|
||||
<tr><td class="pk">Class</td><td>{nd.mode} / {nd.node_type}</td></tr>
|
||||
<tr><td class="pk">Volume</td><td>{Math.round(nd.volume * 100)}% {nd.mute ? '(muted)' : ''}</td></tr>
|
||||
<tr><td class="pk">Ports</td><td>{nd.port_ids.length}</td></tr>
|
||||
{#if nd.sample_rate > 0}<tr><td class="pk">Sample Rate</td><td>{nd.sample_rate} Hz</td></tr>{/if}
|
||||
{#if nd.channels > 0}<tr><td class="pk">Channels</td><td>{nd.channels}</td></tr>{/if}
|
||||
{#if nd.node_type === 'audio' || nd.channels > 0}
|
||||
<tr><td class="pk">Channels</td><td>{nd.channels > 0 ? nd.channels : '-'}</td></tr>
|
||||
<tr><td class="pk">Sample Rate</td><td>{nd.sample_rate > 0 ? nd.sample_rate + ' Hz' : 'default'}</td></tr>
|
||||
{#if nd.quantum > 0}<tr><td class="pk">Latency</td><td>{nd.quantum} samples{#if nd.sample_rate > 0} ({(nd.quantum / nd.sample_rate * 1000).toFixed(1)} ms){/if}</td></tr>{/if}
|
||||
{/if}
|
||||
{#if nd.format}<tr><td class="pk">Format</td><td>{nd.format}</td></tr>{/if}
|
||||
{#if nd.quantum > 0}<tr><td class="pk">Latency</td><td>{nd.quantum} samples @ {nd.sample_rate} Hz</td></tr>{/if}
|
||||
{#if nd.rate > 0}<tr><td class="pk">Period Size</td><td>{nd.rate}</td></tr>{/if}
|
||||
{#if nd.device_name}<tr><td class="pk">Device</td><td>{nd.device_name}</td></tr>{/if}
|
||||
{#if nd.device_bus}<tr><td class="pk">Bus</td><td>{nd.device_bus}</td></tr>{/if}
|
||||
|
||||
Reference in New Issue
Block a user