Choose buffer size/count to maintain packet rate to WS client at different sample rates

This commit is contained in:
Matt
2025-12-13 11:21:09 +00:00
parent 74dd3646b5
commit 33f3360a4b
2 changed files with 52 additions and 18 deletions

View File

@@ -33,7 +33,7 @@
.controls {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
gap: 15px;
}
@@ -44,9 +44,13 @@
color: #bbb;
}
label {
width: 8em;
}
input,
select {
width: 80%;
width: 6em;
padding: 8px;
background: #3d3d3d;
border: 1px solid #555;
@@ -108,11 +112,12 @@
}
#resetBtn {
background:#ef4444;
color:#fff;
padding:4px 8px;
font-size:0.8rem;
background: #222;
color: #e66;
border: 1px solid;
font-size: 0.8rem;
height: 4em;
width: 6em;
}
</style>
</head>
@@ -139,7 +144,7 @@
<label>Sample Rate (Hz)</label>
<input type="number" id="sampleRate" value="10000" min="1" max="83333">
</div>
<div>
<div style="display: none;">
<label>Bit Width</label>
<select id="bitWidth">
<option value="12" selected>12-bit</option>
@@ -157,14 +162,13 @@
<option value="3" selected>11 dB</option>
</select>
</div>
<div style="display: flex; align-items: center; gap: 10px;">
<div>
<div>
<label>Test Hz</label>
<input type="number" id="testHz" value="100" min="1" max="10000">
</div>
<button id="resetBtn">Reset
</button>
</div>
<button id="resetBtn">Reset</button>
</form>
</div>
@@ -174,4 +178,4 @@
<script src="index.js"></script>
</body>
</html>
</html>