소스 검색

some fixes

Andrey Sobolev 11 달 전
부모
커밋
b51004d27f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      controllers/sound.py

+ 3 - 0
controllers/sound.py

@@ -148,6 +148,7 @@ class SoundController:
                 time.sleep(0.05)
                 
         stream.stop()
+        stream.close()
         print('Sound stopped')
 
         
@@ -190,6 +191,7 @@ class ContinuousSoundStream:
             self.stream.write(self.data[start_idx:end_idx])
             
         self.stream.stop()
+        self.stream.close()
         
         
 class SoundControllerPR:
@@ -289,3 +291,4 @@ class SoundControllerPR:
         for t in self.timers:
             t.cancel()
         self.stream.stop()
+        self.stream.close()