Skip to content

Commit

Permalink
Fixed a bug related to free the bass when exiting the program.
Browse files Browse the repository at this point in the history
  • Loading branch information
MahmoudAtef999 committed Dec 23, 2024
1 parent 3b89f02 commit e7c1fa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ui/quran_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from utils.universal_speech import UniversalSpeech
from utils.user_data import UserDataManager
from utils.const import program_name, program_icon, user_db_path, data_folder, Globals
from utils.audio_player import bass, SoundEffectPlayer
from utils.audio_player import SoundEffectPlayer
from exceptions.error_decorators import exception_handler


Expand Down Expand Up @@ -373,8 +373,7 @@ def closeEvent(self, event):
self.tray_manager.tray_icon.showMessage("البيان", "تم تصغير نافذة البيان على صينية النظام, البرنامج يعمل في الخلفية.", msecs=5000)
else:
self.tray_manager.hide_icon()
bass.BASS_Free()


@exception_handler(ui_element=QMessageBox)
def OnRandomMessages(self, event):
info_dialog = InfoDialog(self, 'رسالة لك', '', "", is_html_content=False, show_message_button=True)
Expand Down
5 changes: 4 additions & 1 deletion ui/widgets/menu_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
from utils.settings import SettingsManager
from utils.logger import Logger
from utils.const import program_name, program_version, website, Globals

from utils.audio_player import bass
from theme import ThemeManager


class MenuBar(QMenuBar):
def __init__(self, parent=None):
super().__init__(parent)
Expand Down Expand Up @@ -287,5 +288,7 @@ def quit_application(self):
self.parent.OnSaveCurrentPosition()
self.parent.tray_manager.hide_icon()
QApplication.quit()
bass.BASS_Free()



0 comments on commit e7c1fa6

Please sign in to comment.