From e7290dd517b7212c2589a872dfd84191387347fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Thu, 26 Sep 2024 16:30:20 -0700 Subject: [PATCH] add deprecation to remix_and_resample --- livekit-rtc/livekit/rtc/audio_frame.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/audio_frame.py b/livekit-rtc/livekit/rtc/audio_frame.py index 956bb5e0..da7a2141 100644 --- a/livekit-rtc/livekit/rtc/audio_frame.py +++ b/livekit-rtc/livekit/rtc/audio_frame.py @@ -60,8 +60,12 @@ def _from_owned_info(owned_info: proto_audio.OwnedAudioFrameBuffer) -> "AudioFra ) def remix_and_resample(self, sample_rate: int, num_channels: int) -> "AudioFrame": - """Resample the audio frame to the given sample rate and number of channels.""" + """Resample the audio frame to the given sample rate and number of channels. + .. warning:: + This method is deprecated and will be removed in a future release. + Please use the `rtc.AudioResampler` class instead. + """ req = proto_ffi.FfiRequest() req.new_audio_resampler.CopyFrom(proto_audio.NewAudioResamplerRequest())