File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ def __init__(
6464 self ._sample_rate = sample_rate
6565 self ._num_channels = num_channels
6666 self ._samples_per_channel = samples_per_channel
67+ self ._userdata : dict [str , Any ] = {}
6768
6869 @staticmethod
6970 def create (sample_rate : int , num_channels : int , samples_per_channel : int ) -> "AudioFrame" :
@@ -100,6 +101,13 @@ def _proto_info(self) -> proto_audio.AudioFrameBufferInfo:
100101 audio_info .samples_per_channel = self .samples_per_channel
101102 return audio_info
102103
104+ @property
105+ def userdata (self ) -> dict [str , Any ]:
106+ """
107+ Returns the user data associated with the audio frame.
108+ """
109+ return self ._userdata
110+
103111 @property
104112 def data (self ) -> memoryview :
105113 """
You can’t perform that action at this time.
0 commit comments