sepandhaghighi / nafas

🧘‍♂️ Breathing Gymnastics Application
MIT License
132 stars 7 forks source link

Add sound #23

Closed sadrasabouri closed 3 years ago

sadrasabouri commented 3 years ago

Reference Issues/PRs

4

What does this implement/fix? Explain your changes.

This pull request will add several sound effects to program such as:

It requires playsound library which is used for playing sound asynchronous through program run.

codecov-io commented 3 years ago

Codecov Report

Merging #23 (3c808e7) into dev (12f7d4a) will increase coverage by 0.66%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #23      +/-   ##
==========================================
+ Coverage   95.00%   95.66%   +0.66%     
==========================================
  Files           2        2              
  Lines         140      161      +21     
  Branches       17       18       +1     
==========================================
+ Hits          133      154      +21     
  Misses          4        4              
  Partials        3        3              
Impacted Files Coverage Δ
nafas/functions.py 94.54% <100.00%> (+0.96%) :arrow_up:
nafas/params.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 12f7d4a...3c808e7. Read the comment docs.

sadrasabouri commented 3 years ago

I've tried many things but if we join the thread instantly after starting it, It seems to work like blocking manner.

Anyway this is the last modified version which one of the test's output became awkward, what can we do if we want to have parallel run and don't have this issue simultaneously?

sepandhaghighi commented 3 years ago

I've tried many things but if we join the thread instantly after starting it, It seems to work like blocking manner.

Anyway this is the last modified version which one of the test's output became awkward, what can we do if we want to have parallel run and don't have this issue simultaneously?

@sadrasabouri Thanks for your effort 💯 You are right, play_sound function should return Thread object to join main thread later (at the end of each loop in run function)

For test :

play_sound(1,True).join()
sepandhaghighi commented 3 years ago

LGTM 💯