@@ -93,28 +93,6 @@ def _from_owned_info(owned_info: proto_audio.OwnedAudioFrameBuffer) -> "AudioFra
9393 FfiHandle (owned_info .handle .id )
9494 return AudioFrame (data , info .sample_rate , info .num_channels , info .samples_per_channel )
9595
96- def remix_and_resample (self , sample_rate : int , num_channels : int ) -> "AudioFrame" :
97- """Resample the audio frame to the given sample rate and number of channels.
98-
99- .. warning::
100- This method is deprecated and will be removed in a future release.
101- Please use the `rtc.AudioResampler` class instead.
102- """
103- req = proto_ffi .FfiRequest ()
104- req .new_audio_resampler .CopyFrom (proto_audio .NewAudioResamplerRequest ())
105-
106- resp = FfiClient .instance .request (req )
107- resampler_handle = FfiHandle (resp .new_audio_resampler .resampler .handle .id )
108-
109- resample_req = proto_ffi .FfiRequest ()
110- resample_req .remix_and_resample .resampler_handle = resampler_handle .handle
111- resample_req .remix_and_resample .buffer .CopyFrom (self ._proto_info ())
112- resample_req .remix_and_resample .sample_rate = sample_rate
113- resample_req .remix_and_resample .num_channels = num_channels
114-
115- resp = FfiClient .instance .request (resample_req )
116- return AudioFrame ._from_owned_info (resp .remix_and_resample .buffer )
117-
11896 def _proto_info (self ) -> proto_audio .AudioFrameBufferInfo :
11997 audio_info = proto_audio .AudioFrameBufferInfo ()
12098 audio_info .data_ptr = get_address (memoryview (self ._data ))
0 commit comments