dualsense-ts
Version:
The natural interface for your DualSense and DualSense Access controllers, with Typescript
77 lines • 2.97 kB
TypeScript
import { AudioOutput, MicSelect, MicMode } from "../hid/command";
/** Audio control state for the DualSense controller */
export declare class Audio {
/** Headphone volume (0.0–1.0) */
private _headphoneVolume;
/** Speaker volume (0.0–1.0) */
private _speakerVolume;
/** Microphone volume (0.0–1.0) */
private _microphoneVolume;
/** Audio output routing */
private _output;
/** Microphone source selection */
private _micSelect?;
/** Microphone processing flags */
private _micFlags;
/** Microphone input mode */
private _micMode;
/** Speaker preamp gain (0–7) */
private _preampGain;
/** Beam forming enabled */
private _beamForming;
/** Per-subsystem mute flags */
private _muteMask;
/** Get headphone volume as a fraction (0.0–1.0) */
get headphoneVolume(): number;
/** Set headphone volume (0.0–1.0) */
setHeadphoneVolume(volume: number): void;
/** Get speaker volume as a fraction (0.0–1.0) */
get speakerVolume(): number;
/** Set speaker volume (0.0–1.0) */
setSpeakerVolume(volume: number): void;
/** Get microphone volume as a fraction (0.0–1.0) */
get microphoneVolume(): number;
/** Set microphone volume (0.0–1.0) */
setMicrophoneVolume(volume: number): void;
/** Get audio output routing */
get output(): AudioOutput;
/** Set audio output routing */
setOutput(output: AudioOutput): void;
/** Get speaker preamp gain (0–7) */
get preampGain(): number;
/** Set speaker preamp gain (0–7) and optional beam forming */
setPreamp(gain: number, beamForming?: boolean): void;
/** Whether beam forming is enabled */
get beamForming(): boolean;
/** Set microphone source */
setMicSelect(source: MicSelect): void;
/** Set microphone processing flags (echo cancellation, noise cancellation) */
setMicFlags(flags: number): void;
/** Set microphone input mode */
setMicMode(mode: MicMode): void;
/** Mute the speaker */
muteSpeaker(muted?: boolean): void;
/** Mute the headphone output */
muteHeadphone(muted?: boolean): void;
/** Mute the microphone */
muteMicrophone(muted?: boolean): void;
/** Whether the speaker is muted */
get speakerMuted(): boolean;
/** Whether headphone output is muted */
get headphoneMuted(): boolean;
/** Whether the microphone is muted */
get microphoneMuted(): boolean;
/** Raw headphone volume byte (0x00–0x7F) */
get headphoneVolumeRaw(): number;
/** Raw speaker volume byte (0x00–0x64) */
get speakerVolumeRaw(): number;
/** Raw microphone volume byte (0x00–0x40) */
get microphoneVolumeRaw(): number;
/** Composed audio flags byte */
get audioFlags(): number;
/** Power save mute mask */
get powerSaveFlags(): number;
/** Change-detection key for the output loop */
toKey(): string;
}
//# sourceMappingURL=audio.d.ts.map