class RouteGraph
Defined at line 41 of file ../../src/media/audio/audio_core/route_graph.h
|RouteGraph| is responsible for managing connections between inputs and outputs of the mixer.
|RouteGraph| owns user-level inputs and outputs (|AudioRenderer|s and |AudioCapturer|s).
Renderers are routed by Usage to the most recently plugged output that supports their Usage.
Capturers are routed to the most recently plugged device that supports their usage.
Public Methods
void RouteGraph (LinkMatrix * link_matrix)
Constructs a graph from the given config and link matrix. Each parameter must outlive the
RouteGraph.
Defined at line 35 of file ../../src/media/audio/audio_core/route_graph.cc
void ~RouteGraph ()
Defined at line 39 of file ../../src/media/audio/audio_core/route_graph.cc
void SetIdlePowerOptionsFromPolicy (AudioPolicy::IdlePowerOptions options)
DeviceRouter implementation
Defined at line 51 of file ../../src/media/audio/audio_core/route_graph.h
void AddDeviceToRoutes (AudioDevice * device)
Adds an |AudioInput| or |AudioOutput| to the route graph. An audio input may be connected to
transmit samples to an |AudioCapturer|; an audio output receives samples from an
|AudioRenderer|.
Defined at line 62 of file ../../src/media/audio/audio_core/route_graph.cc
void RemoveDeviceFromRoutes (AudioDevice * device)
Removes an |AudioInput| or |AudioOutput| from the route graph. Any connected |AudioCapturer|s
or |AudioRenderer|s will be rerouted.
Defined at line 83 of file ../../src/media/audio/audio_core/route_graph.cc
void SetThrottleOutput (ThreadingModel * threading_model, const std::shared_ptr<AudioOutput> & throttle_output)
TODO(https://fxbug.dev/42083315): Remove throttle_output_.
Sets a throttle output which is linked to all AudioRenderers to throttle the rate at which we
return packets to clients.
Defined at line 45 of file ../../src/media/audio/audio_core/route_graph.cc
bool ContainsDevice (const AudioDevice * device)
Returns a boolean indicating if a |device| is contained in the route graph.
Defined at line 106 of file ../../src/media/audio/audio_core/route_graph.cc
void AddRenderer (std::shared_ptr<AudioObject> renderer)
Adds an |AudioRenderer| to the route graph. An |AudioRenderer| may be connected to
|AudioOutput|s.
Defined at line 110 of file ../../src/media/audio/audio_core/route_graph.cc
void SetRendererRoutingProfile (const AudioObject & renderer, RoutingProfile profile)
Sets the routing profile with which the route graph selects |AudioOutput|s for the
|AudioRenderer|.
Defined at line 125 of file ../../src/media/audio/audio_core/route_graph.cc
void RemoveRenderer (const AudioObject & renderer)
Defined at line 164 of file ../../src/media/audio/audio_core/route_graph.cc
void AddCapturer (std::shared_ptr<AudioObject> capturer)
Adds an |AudioCapturer| to the route graph. An |AudioCapturer| may be connected to
|AudioInput|s to receive samples from them.
Defined at line 192 of file ../../src/media/audio/audio_core/route_graph.cc
void SetCapturerRoutingProfile (const AudioObject & capturer, RoutingProfile profile)
Sets the routing profile with which the route graph selects |AudioInput|s for the
|AudioCapturer|.
Defined at line 208 of file ../../src/media/audio/audio_core/route_graph.cc
void RemoveCapturer (const AudioObject & capturer)
Defined at line 247 of file ../../src/media/audio/audio_core/route_graph.cc
std::unordered_set<AudioDevice *> TargetsForRenderUsage (const RenderUsage & usage)
The API is formed to return more than one output as the target for a RenderUsage, but the current
audio_core implementation only routes to one output per usage.
Defined at line 380 of file ../../src/media/audio/audio_core/route_graph.cc
std::shared_ptr<LoudnessTransform> LoudnessTransformForUsage (const StreamUsage & usage)
Defined at line 393 of file ../../src/media/audio/audio_core/route_graph.cc