// Abstract interface for providing the audio data. // TODO(deadbeef): Rename this to AudioSourceInterface, and rename // AudioSourceInterface to AudioTrackSourceInterface. class AudioSource { public: class Sink { public: // Callback to receive data from the AudioSource. virtualvoid OnData( constvoid* audio_data,
int bits_per_sample,
int sample_rate,
size_t number_of_channels,
size_t number_of_frames,
std::optional<int64_t> absolute_capture_timestamp_ms) = 0;
// Called when the AudioSource is going away. virtualvoid OnClose() = 0;
// Returns the number of channels encoded by the sink. This can be less than // the number_of_channels if down-mixing occur. A value of -1 means an // unknown number. virtual int NumPreferredChannels() const = 0;
protected: virtual ~Sink() {}
};
// Sets a sink to the AudioSource. There can be only one sink connected // to the source at a time. virtualvoid SetSink(Sink* sink) = 0;
protected: virtual ~AudioSource() {}
};
} // namespace webrtc
#endif// MEDIA_BASE_AUDIO_SOURCE_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-08-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.