Allow pipewire build with version < 0.3.49

This commit is contained in:
Patrick Nicolas
2024-03-23 20:24:23 +01:00
parent 3beb573566
commit f951034de4
+4
View File
@@ -206,7 +206,11 @@ void pipewire_device::mic_process(void * self_v)
const size_t frame_size = self->desc.microphone->num_channels * sizeof(int16_t);
#if PW_CHECK_VERSION(0,3,49)
size_t num_frames = buffer->requested;
#else
size_t num_frames = 0;
#endif
if (num_frames == 0)
{
num_frames = data.maxsize / frame_size;