audio

package
v0.0.0-...-9474aff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package audio contains common utilities to help writing ARC audio tests.

Index

Constants

View Source
const (
	// Apk is the testing App.
	Apk = "ARCAudioTest.apk"
	// Pkg is the package name the testing App.
	Pkg = "org.chromium.arc.testapp.arcaudiotest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ARCAudioTast

type ARCAudioTast struct {
	// contains filtered or unexported fields
}

ARCAudioTast holds the resource that needed across ARC audio tast test steps.

func NewARCAudioTast

func NewARCAudioTast(ctx context.Context, a *arc.ARC, cr *chrome.Chrome, d *ui.Device) (*ARCAudioTast, error)

NewARCAudioTast creates an ARCAudioTast.

func (*ARCAudioTast) RunAppAndPollStream

func (t *ARCAudioTast) RunAppAndPollStream(ctx context.Context, apkPath string, param TestParameters) ([]crastestclient.StreamInfo, error)

RunAppAndPollStream verifies the '0' or '1' result on the test App UI, where '0' means fail and '1' means pass and it also starts a goroutine to poll the audio streams created by the test App.

func (*ARCAudioTast) RunAppTest

func (t *ARCAudioTast) RunAppTest(ctx context.Context, apkPath string, param TestParameters) error

RunAppTest runs the test that result can be either '0' or '1' on the test App UI, where '0' means fail and '1' means pass.

type PerformanceMode

type PerformanceMode uint64

PerformanceMode equals to AudioTrack::PERFORMANCE_MODE definition.

const (
	// PerformanceModeNone equals to AudioTrack::PERFORMANCE_MODE_NONE
	PerformanceModeNone PerformanceMode = iota
	// PerformanceModeLowLatency equals to AudioTrack::PERFORMANCE_MODE_LOW_LATENCY
	PerformanceModeLowLatency
	// PerformanceModePowerSaving equals to AudioTrack::PERFORMANCE_MODE_POWER_SAVING
	PerformanceModePowerSaving
)

type TestParameters

type TestParameters struct {
	Permission           string
	Class                string
	PerformanceMode      PerformanceMode
	BatteryDischargeMode setup.BatteryDischargeMode
}

TestParameters holds the ARC audio tast parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL