Skip to content

Commit

Permalink
Fixed sample rate problem in UI
Browse files Browse the repository at this point in the history
Fixed position of refernce call zoom buttons
  • Loading branch information
Mattk70 committed Oct 30, 2024
1 parent 447c7b9 commit b6603c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 3 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ div#contentWrapper.loaded {
position: absolute;
font-size: calc(32px * var(--font-size-scale));;
}

.zoom-xc {
font-size: calc(32px * var(--font-size-scale));;
}
.species-selector {
position: relative;
}
Expand Down
5 changes: 2 additions & 3 deletions js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -3014,7 +3014,6 @@ function centreSpec(){

function onModelReady(args) {
modelReady = true;
sampleRate = args.sampleRate;
if (fileLoaded) {
enableMenuItem(['analyse'])
if (STATE.openFiles.length > 1) enableMenuItem(['analyseAll', 'reanalyseAll'])
Expand Down Expand Up @@ -5615,10 +5614,10 @@ function renderComparisons(lists, cname){
</button>
<div class="btn-group" role="group">
<button id="cmpZoomIn" title="Zoom into the spectrogram" class="btn btn-outline-secondary p-0">
<span class="material-symbols-outlined zoom">zoom_in</span>
<span class="material-symbols-outlined zoom-xc">zoom_in</span>
</button>
<button id="cmpZoomOut" title="Zoom out of the spectrogram" class="btn btn-outline-secondary p-0"
style="max-width: 70px"><span class="material-symbols-outlined zoom align-middle">zoom_out</span>
style="max-width: 70px"><span class="material-symbols-outlined zoom-xc align-middle">zoom_out</span>
</button>
</div>
</div>
Expand Down
9 changes: 3 additions & 6 deletions js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (process.platform === 'win32') {
ntsuspend = require('ntsuspend');
isWin32 = true;
}
const DEBUG = false;
const DEBUG = true;

// Function to join Buffers and not use Buffer.concat() which leads to detached ArrayBuffers
function joinBuffers(buffer1, buffer2) {
Expand Down Expand Up @@ -1311,7 +1311,6 @@ function checkBacklog(ffmpegCommand = null) {

const interval = setInterval(() => {
const backlog = AUDIO_BACKLOG;

if (aborted) {
clearInterval(interval);
resolve(false);
Expand Down Expand Up @@ -2197,12 +2196,10 @@ async function parseMessage(e) {
SEEN_MODEL_READY = true;
sampleRate = response["sampleRate"];
const backend = response["backend"];
console.log(backend);
DEBUG && console.log(backend);
UI.postMessage({
event: "model-ready",
message: "ready",
backend: backend,
sampleRate: sampleRate
message: "Give It To Me Baby. Uh-Huh Uh-Huh"
});
}
break;
Expand Down

0 comments on commit b6603c6

Please sign in to comment.