class AudioRendererTest

Defined at line 51 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

AudioRendererTest

This base class is reused by child classes that provide grouping of specific test areas.

As currently implemented, AudioRenderer's four "NoReply" methods (PlayNoReply, PauseNoReply,

SendPacketNoReply, DiscardAllPacketsNoReply) each simply redirect to their counterpart with a

'nullptr' callback parameter. For this reason, we don't exhaustively test the NoReply variants,

instead covering them with 1-2 representative test cases each (in addition to those places where

they are used instead of the "reply" variants for test simplicity).

Protected Members

static AudioStreamType kTestStreamType
static const uint64_t kDefaultPacketSize
static StreamPacket kTestPacket

Protected Methods

size_t DefaultPayloadBufferSize ()

The following are valid/invalid when used with |kTestStreamType|.

In bytes: payload buffer 40960 (~ 106 ms); default packet 3840 (10 ms).

Defined at line 62 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

void SetUp ()

Defined at line 73 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

void TearDown ()

Defined at line 80 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

void ExpectConnected ()

This can be used as a simple round-trip to indicate that all FIDL messages have been read out

of the channel, and thus have been handled successfully (i.e. no disconnect was triggered).

Defined at line 88 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

void ExpectConnectedAndDiscardAllPackets ()

Discard in-flight packets and await a renderer response. This checks that the completions for

all enqueued packets are received, and that the Discard completion is received only afterward.

Thus, this also verifies more generally that the renderer is still connected.

Defined at line 97 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

void CreateAndAddPayloadBuffer (uint32_t id)

Create a VMO and pass it to |AudioRenderer::AddPayloadBuffer| with a given |id|. This is

purely a convenience method: it does not provide access to the underlying buffer VMO (the VMO

is not mapped). As with all VMOs, the memory region is automatically zeroed-out.

Defined at line 106 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h

fuchsia::media::AudioRendererPtr & audio_renderer ()

Defined at line 113 of file ../../src/media/audio/audio_core/test/api/audio_renderer_test_shared.h