Fix remote submix MIX_RECORD stop
Since rework of presentationTimestamp in AudioFlinger, it is expecting
to drain correctly before stopping an output.
When a MIX RECORDER is set,
1/ Dynamic Policy Mix is registered
2/ Extraction Sink Port is made available
3/ Player is started on this sink
4/ Extraction source port is connected upon start Output
4/ Capture may be launched on the source to be rerouted
5/ All Capture are stopped, player is stopped
6/ Extraction source port shall be disconnected on stopOutput
Step 6 does not happen as the track is never set as drained.
Upon capture stop, rxSink MonoPipe is put in shutdown state. Any further
write will discard the buffer. However, frames written shall be
incremented of these frame discarded to be able to set the track as
drained.
This CL fixes this issue.
Test: AudioPolicyEmulatorTests --gtest_filter=RecordInjectionSourceMatch/DynamicPolicyMixRecordInjectionTest.RecordingInjection/*
Bug: 130356101
Change-Id: I861c4867991da8bcc1090be56d64e69646d58dc2
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
1 file changed