Fixed voice preview player keeps open at the background

This commit is contained in:
Deniz Şafak
2025-05-21 04:54:13 +03:00
parent 0d7e746516
commit fd10aab6f3
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -1,6 +1,7 @@
# v1.0.8 (pre-release)
- Added support for AMD GPUs in Linux (Special thanks to @hg000125 for his contribution in #23)
- Skipping PyTorch CUDA installation if GPU is not NVIDIA in WINDOWS_INSTALL.bat script, preventing unnecessary installation of PyTorch.
- Fixed voice preview player keeps open at the background after stopping the preview.
- Improved input box background color handling, fixed display issues in Linux Wayland.
- Better sleep state handling for Linux.
+2 -1
View File
@@ -919,8 +919,9 @@ class PlayAudioThread(QThread):
pygame.mixer.music.play()
# Wait until playback is finished
while pygame.mixer.music.get_busy():
_time.sleep(0.1)
_time.sleep(0.2)
pygame.mixer.music.unload()
pygame.mixer.quit() # Quit the mixer
self.finished.emit()
except Exception as e:
self.error.emit(f"Audio playback error: {str(e)}")