Skip to content

Conversation

oliviamiller
Copy link
Member

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Oct 14, 2025
@seanavery
Copy link
Member

seanavery commented Oct 14, 2025

@oliviamiller This PR also includes audioin diff, should we just review audioout related changes here?

@oliviamiller
Copy link
Member Author

@oliviamiller This PR also includes audioin diff, should we just review audioout related changes here?

Yeah I branched off audioin since there is some shared code, you can just review audioout here or hold off on reviewing until the audioin PR is merged.

@hexbabe
Copy link
Member

hexbabe commented Oct 15, 2025

@oliviamiller This PR also includes audioin diff, should we just review audioout related changes here?

Yeah I branched off audioin since there is some shared code, you can just review audioout here or hold off on reviewing until the audioin PR is merged.

got it i'll wait until the audioin changes are finalized and the diff is less confusing

// SubtypeName is a constant that identifies the audio out resource subtype string.
const SubtypeName = "audio_out"

// API is a variable that identifies the audio input resource API.

Choose a reason for hiding this comment

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

This should say the audio output, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, thanks for catching

@@ -0,0 +1,188 @@
package audioout_test

Choose a reason for hiding this comment

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

Nice testing :)

// Properties defines properties of an audio device.
type Properties struct {
SupportedCodecs []string
SampleRate int32

Choose a reason for hiding this comment

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

Can this be renamed to SampleRateHz?

// AudioInfo defines information about audio data.
type AudioInfo struct {
Codec string
SampleRate int32

Choose a reason for hiding this comment

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

Same here, SampleRateHz

func AudioInfoPBToStruct(pb *commonpb.AudioInfo) *AudioInfo {
return &AudioInfo{
Codec: pb.Codec,
SampleRate: pb.SampleRate,

Choose a reason for hiding this comment

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

SampleRateHz

func AudioInfoStructToPb(info *AudioInfo) *commonpb.AudioInfo {
return &commonpb.AudioInfo{
Codec: info.Codec,
SampleRate: info.SampleRate,

Choose a reason for hiding this comment

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

SampleRateHz

golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
)

replace go.viam.com/api => ../api

Choose a reason for hiding this comment

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

This is temporary while the proto API is not submitted, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants