MCPcopy Index your code
hub / github.com/callstack/agent-device / readHostSystemAudioProbeStatus

Function readHostSystemAudioProbeStatus

src/daemon/audio-probe.ts:109–121  ·  view source on GitHub ↗
(
  session: SessionState,
)

Source from the content-addressed store, hash-verified

107}
108
109async function readHostSystemAudioProbeStatus(
110 session: SessionState,
111): Promise<AudioProbeResult | undefined> {
112 const probe = session.audioProbe;
113 if (!probe) return undefined;
114 try {
115 const raw = await fs.readFile(probe.statusPath, 'utf8');
116 return normalizeHostSystemAudioProbeData(JSON.parse(raw), probe);
117 } catch (error) {
118 if ((error as NodeJS.ErrnoException).code === 'ENOENT') return undefined;
119 throw error;
120 }
121}
122
123function normalizeHostSystemAudioProbeData(
124 value: unknown,

Callers 3

stopSessionAudioProbeFunction · 0.85

Calls 2

parseMethod · 0.45

Tested by

no test coverage detected