Skip to content

Commit

Permalink
🚧 Add flush audio clock drift measure on webui in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
geekuillaume committed Nov 2, 2020
1 parent b6b9ec6 commit 032420b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webui/src/components/Sink/SinkContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import UpdateIcon from '@material-ui/icons/Update';
import { useRegisterForPipe, useUnpipeAction } from 'utils/useSoundSyncState';
import { nameWithoutHiddenMeta, isHidden } from 'utils/hiddenUtils';
import { AudioSink } from '../../../../src/audio/sinks/audio_sink';
import { WebAudioSink } from '../../../../src/audio/sinks/webaudio_sink';

const DELETABLE_SINK_TYPES = ['huelight', 'airplay'];

Expand Down Expand Up @@ -191,6 +192,7 @@ export const SinkContextMenu = ({
{sink.latencyCorrection === 0 && <PopoverButton disableElevation variant="contained" onClick={handleIncreaseLatencyCorrection}>Set latency correction</PopoverButton>}
{canBeDeleted && <PopoverButton disableElevation variant="contained" onClick={handleDelete}>Delete</PopoverButton>}
{window.localStorage.getItem('soundsync:debug') && <PopoverButton disableElevation variant="contained" onClick={() => console.log(sink)}>Log info</PopoverButton>}
{window.localStorage.getItem('soundsync:debug') && sink instanceof WebAudioSink && <PopoverButton disableElevation variant="contained" onClick={() => sink instanceof WebAudioSink && sink.audioClockDriftHistory.flush()}>Flush drift info</PopoverButton>}
</>
);

Expand Down

0 comments on commit 032420b

Please sign in to comment.