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__(
64
64
self ._sample_rate = sample_rate
65
65
self ._num_channels = num_channels
66
66
self ._samples_per_channel = samples_per_channel
67
+ self ._userdata : dict [str , Any ] = {}
67
68
68
69
@staticmethod
69
70
def create (sample_rate : int , num_channels : int , samples_per_channel : int ) -> "AudioFrame" :
@@ -100,6 +101,13 @@ def _proto_info(self) -> proto_audio.AudioFrameBufferInfo:
100
101
audio_info .samples_per_channel = self .samples_per_channel
101
102
return audio_info
102
103
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
+
103
111
@property
104
112
def data (self ) -> memoryview :
105
113
"""
You can’t perform that action at this time.
0 commit comments