Error catching

- PCMStream.clean_up
- PCMStream.read
This commit is contained in:
Logan Cusano
2022-02-27 17:25:10 -05:00
parent 167c06f331
commit f9594e2afe

View File

@@ -22,7 +22,7 @@ class PCMStream:
# convert to pcm format
return bytes(data)
except sounddevice.PortAudioError as err:
except Exception as err:
print(f"Error in PCMStream.read: '{err}'")
def change_device(self, device_ID):
@@ -39,7 +39,7 @@ class PCMStream:
self.stream.close()
except sounddevice.PortAudioError as err:
except Exception as err:
print(f"Error in PCMStream.clean_up: '{err}'")