Updated code to only ask for input stream when starting recording

This commit is contained in:
Anne de Jong 2022-06-07 15:01:53 +02:00
parent 89a29c6d41
commit c9580b2c28
2 changed files with 7 additions and 9 deletions

View File

@ -283,14 +283,13 @@ class AvStreamProcess(mp.Process):
return return
elif msg == StreamMsg.getStreamMetaData: elif msg == StreamMsg.getStreamMetaData:
(avtype,) = data (avtype, ) = data
stream = self.streams[avtype] duplex = self.streams[AvType.audio_duplex]
if stream is not None: stream = duplex if duplex else self.streams[avtype]
self.sendAllQueues( self.sendAllQueues(
StreamMsg.streamMetaData, avtype, stream.streammetadata StreamMsg.streamMetaData, avtype, stream.streammetadata
) )
else:
self.sendAllQueues(StreamMsg.streamMetaData, avtype, None)
elif msg == StreamMsg.startStream: elif msg == StreamMsg.startStream:
avtype, daqconfig = data avtype, daqconfig = data

View File

@ -84,7 +84,6 @@ class Recording:
# Try to obtain stream metadata # Try to obtain stream metadata
streammgr.getStreamStatus(AvType.audio_input) streammgr.getStreamStatus(AvType.audio_input)
streammgr.getStreamStatus(AvType.audio_duplex)
self.ad = None self.ad = None