MCPcopy Index your code
hub / github.com/codeaashu/claude-code / linuxHasAlsaCards

Function linuxHasAlsaCards

src/services/voice.ts:130–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128let linuxAlsaCardsMemo: Promise<boolean> | null = null
129
130function linuxHasAlsaCards(): Promise<boolean> {
131 linuxAlsaCardsMemo ??= readFile('/proc/asound/cards', 'utf8').then(
132 cards => {
133 const c = cards.trim()
134 return c !== '' && !c.includes('no soundcards')
135 },
136 () => false,
137 )
138 return linuxAlsaCardsMemo
139}
140
141export function _resetAlsaCardsForTesting(): void {
142 linuxAlsaCardsMemo = null

Callers 1

startRecordingFunction · 0.85

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected