Skip to content

Commit

Permalink
fix : minor bug in loop section fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Mar 25, 2024
1 parent cc50fc4 commit 154acea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions nava/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def __play_win(sound_path, async_mode=False, loop=False):

if async_mode:
sound_thread = NavaThread(target=__play_win_flags,
args=(sound_path, play_flags), daemon=True, loop=loop)
args=(sound_path, play_flags), daemon=True)
sound_thread.loop = loop
sound_thread.start()
sound_id = sound_id_gen()
params._play_threads_map[sound_id] = sound_thread
Expand Down Expand Up @@ -141,8 +142,8 @@ def __play_linux(sound_path, async_mode=False, loop=False):
if async_mode:
sound_thread = NavaThread(target=__play_proc_linux,
args=(sound_path,),
daemon=True,
loop=loop)
daemon=True)
sound_thread.loop = loop
sound_thread.start()
sound_id = sound_id_gen()
params._play_threads_map[sound_id] = sound_thread
Expand Down Expand Up @@ -188,8 +189,8 @@ def __play_mac(sound_path, async_mode=False, loop=False):
if async_mode:
sound_thread = NavaThread(target=__play_proc_mac,
args=(sound_path,),
daemon=True,
loop=loop)
daemon=True)
sound_thread.loop = loop
sound_thread.start()
sound_id = sound_id_gen()
params._play_threads_map[sound_id] = sound_thread
Expand Down
2 changes: 1 addition & 1 deletion nava/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def run(self):
:return: None
"""
if self._target is not None:
if self.sys_platform != "win32":
if self.sys_platform == "win32":
self.play_process = self._target(*self._args, **self._kwargs)
else:
while True:
Expand Down

0 comments on commit 154acea

Please sign in to comment.