Skip to content

Conversation

@Saelmala
Copy link
Contributor

Changes the type of the audio device from the mock format to the real format received

@Saelmala Saelmala self-assigned this Jun 23, 2025
Comment on lines +35 to +49
export type TAudioDevice = {
name: string;
maxInputChannels: number;
maxOutputChannels: number;
defaultSampleRate: number;
defaultLowInputLatency: number;
defaultLowOutputLatency: number;
defaultHighInputLatency: number;
defaultHighOutputLatency: number;
isInput: boolean;
isOutput: boolean;
hostApiName: string;
label?: string;
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export type TAudioDevice = {
name: string;
maxInputChannels: number;
maxOutputChannels: number;
defaultSampleRate: number;
defaultLowInputLatency: number;
defaultLowOutputLatency: number;
defaultHighInputLatency: number;
defaultHighOutputLatency: number;
isInput: boolean;
isOutput: boolean;
hostApiName: string;
label?: string;
};
export type TAudioDevice = {
name: string;
maxChannels: number;
defaultSampleRate: number;
defaultLowLatency: number;
defaultHighLatency: number;
type: "input" | "output";
hostApiName: string;
label?: string;
};

isInput: boolean;
isOutput: boolean;
hostApiName: string;
label?: string;
Copy link
Contributor

@malmen237 malmen237 Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label?: string;
or
label: string;

Comment on lines 103 to 105
{d.label && d.label.length > 40
? `${d.label.slice(0, 40)}...`
: d.label}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{d.label && d.label.length > 40 ? `${d.label.slice(0, 40)}...` : d.label}

This will cause an error on first load if the manager doesn't add label to new audioDevices

Copy link
Contributor

@malmen237 malmen237 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to determine if the label is created in the manager or if the UI creates the label, since it's not part of the port-audio original parameters. If it is optional this will lead to some issues, that needs to be fixed.

@Saelmala Saelmala marked this pull request as draft August 18, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants