@@ -164,7 +164,7 @@ PYBIND11_MODULE(NDIlib, m) {
164164 size_t row = self.no_channels ;
165165 size_t size = sizeof (float );
166166 auto buffer_info = py::buffer_info (
167- self.p_data , size, py::format_descriptor<float >::format (), row ,
167+ self.p_data , size, py::format_descriptor<float >::format (), 2 ,
168168 {row, col}, {col * size, size});
169169 return py::array (buffer_info);
170170 },
@@ -214,8 +214,8 @@ PYBIND11_MODULE(NDIlib, m) {
214214 size_t row = self.no_channels ;
215215 size_t size = sizeof (uint8_t );
216216 auto buffer_info = py::buffer_info (
217- self.p_data , size, py::format_descriptor<uint8_t >::format (),
218- row, {row, col}, {col * size * 4 , size});
217+ self.p_data , size, py::format_descriptor<uint8_t >::format (), 2 ,
218+ {row, col}, {col * size * 4 , size});
219219 return py::array (buffer_info);
220220 },
221221 [](NDIlib_audio_frame_v3_t &self, py::array_t <uint8_t > &array) {
@@ -1142,8 +1142,8 @@ PYBIND11_MODULE(NDIlib, m) {
11421142 size_t row = self.no_channels ;
11431143 size_t size = sizeof (int16_t );
11441144 auto buffer_info = py::buffer_info (
1145- self.p_data , size, py::format_descriptor<int16_t >::format (),
1146- row, {row, col}, {col * size, size});
1145+ self.p_data , size, py::format_descriptor<int16_t >::format (), 2 ,
1146+ {row, col}, {col * size, size});
11471147 return py::array (buffer_info);
11481148 },
11491149 [](NDIlib_audio_frame_interleaved_16s_t &self,
@@ -1178,8 +1178,8 @@ PYBIND11_MODULE(NDIlib, m) {
11781178 size_t row = self.no_channels ;
11791179 size_t size = sizeof (int32_t );
11801180 auto buffer_info = py::buffer_info (
1181- self.p_data , size, py::format_descriptor<int32_t >::format (),
1182- row, {row, col}, {col * size, size});
1181+ self.p_data , size, py::format_descriptor<int32_t >::format (), 2 ,
1182+ {row, col}, {col * size, size});
11831183 return py::array (buffer_info);
11841184 },
11851185 [](NDIlib_audio_frame_interleaved_32s_t &self,
@@ -1212,7 +1212,7 @@ PYBIND11_MODULE(NDIlib, m) {
12121212 size_t row = self.no_channels ;
12131213 size_t size = sizeof (float );
12141214 auto buffer_info = py::buffer_info (
1215- self.p_data , size, py::format_descriptor<float >::format (), row ,
1215+ self.p_data , size, py::format_descriptor<float >::format (), 2 ,
12161216 {row, col}, {col * size, size});
12171217 return py::array (buffer_info);
12181218 },
0 commit comments