| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | List of all members
AudioRouting Class Reference

Encapsulates the mute state and channel assignment for one audio stream. More...

`#include <rtp_audio_routing.h>`

## Public Member Functions
| AudioRouting ()=default
| Construct a default AudioRouting with unmuted mono output.
| ~AudioRouting ()=default
| Destruct an AudioRouting.
| AudioRouting (const AudioRouting &)=default
| Copy an AudioRouting.
AudioRouting & | operator= (const AudioRouting &)=default
| Assign an AudioRouting.
| AudioRouting (bool muted, audio_routing_channel_t channel)
| Construct an AudioRouting with explicit mute state and channel.
bool | isMuted ()
| Return whether the stream is currently muted.
void | setMuted (bool muted)
| Set the mute state of the stream.
audio_routing_channel_t | getChannel ()
| Return the current channel assignment.
void | setChannel (audio_routing_channel_t channel)
| Set the channel assignment.
char const * | formatAudioRoutingToString ()
| Return a human-readable string describing this routing.
AudioRouting | getNextChannel (bool stereo_available)
| Return the next logical channel in the cycling order.
AudioRouting | convert (bool stereo_available)
| Convert this routing to be valid for the given output capability.
void | mergeAudioRouting (AudioRouting new_audio_routing)
| Merge an updated routing into this object.

## Detailed Description

Encapsulates the mute state and channel assignment for one audio stream.

## Constructor & Destructor Documentation

## ◆ AudioRouting()

AudioRouting::AudioRouting | ( | bool | muted,
|  | audio_routing_channel_t | channel )

Construct an AudioRouting with explicit mute state and channel.

Parameters

  muted | true if the stream should be silenced; false to play.
  channel | The output channel assignment for this stream.

## Member Function Documentation

## ◆ convert()

AudioRouting AudioRouting::convert | ( | bool | stereo_available | ) |

Convert this routing to be valid for the given output capability.

Parameters

  stereo_available | true if the audio device supports stereo.

Returns
  A valid AudioRouting for the given output capability.

## ◆ formatAudioRoutingToString()

char const * AudioRouting::formatAudioRoutingToString | ( |  | ) |

Return a human-readable string describing this routing.

Returns
  A null-terminated string literal describing the routing. The caller must not free or modify this pointer.

## ◆ getChannel()

audio_routing_channel_t AudioRouting::getChannel | ( |  | ) |
| inline

Return the current channel assignment.

Returns
  The active `audio_routing_channel_t` value.

## ◆ getNextChannel()

AudioRouting AudioRouting::getNextChannel | ( | bool | stereo_available | ) |

Return the next logical channel in the cycling order.

Parameters

  stereo_available | true if the audio device supports stereo output; false for mono-only devices.

Returns
  A new AudioRouting with the mute state preserved and the channel advanced to the next value in the cycle.

## ◆ isMuted()

bool AudioRouting::isMuted | ( |  | ) |
| inline

Return whether the stream is currently muted.

Returns
  true if the stream is muted; false if it is audible.

## ◆ mergeAudioRouting()

void AudioRouting::mergeAudioRouting | ( | AudioRouting | new_audio_routing | ) |

Merge an updated routing into this object.

Parameters

  new_audio_routing | The incoming routing update to apply.

## ◆ operator=()

AudioRouting & AudioRouting::operator= | ( | const AudioRouting & |  | ) |
| default

Assign an AudioRouting.

Parameters

  other | The AudioRouting to copy.

Returns
  A reference to this AudioRouting.

## ◆ setChannel()

void AudioRouting::setChannel | ( | audio_routing_channel_t | channel | ) |
| inline

Set the channel assignment.

Parameters

  channel | The new channel destination for this stream.

## ◆ setMuted()

void AudioRouting::setMuted | ( | bool | muted | ) |
| inline

Set the mute state of the stream.

Parameters

  muted | true to silence the stream; false to make it audible.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/utils/rtp_audio_routing.h
- /builds/wireshark/wireshark/ui/qt/utils/rtp_audio_routing.cpp