diff options
Diffstat (limited to 'music_sampler.py')
-rw-r--r-- | music_sampler.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/music_sampler.py b/music_sampler.py index 6cc49df..9f14d56 100644 --- a/music_sampler.py +++ b/music_sampler.py | |||
@@ -10,7 +10,7 @@ size = width, height = 1024, 600 | |||
10 | 10 | ||
11 | helpers.draw_lock.acquire() | 11 | helpers.draw_lock.acquire() |
12 | screen = pygame.display.set_mode(size) | 12 | screen = pygame.display.set_mode(size) |
13 | mapping = helpers.Mapping(screen) | 13 | mapping = helpers.Mapping(screen, helpers.draw_lock) |
14 | 14 | ||
15 | action_surface = pygame.Surface((600, 250)).convert() | 15 | action_surface = pygame.Surface((600, 250)).convert() |
16 | action_surface.fill((0,0,0)) | 16 | action_surface.fill((0,0,0)) |
@@ -38,6 +38,11 @@ while 1: | |||
38 | event.type == pygame.KEYDOWN and | 38 | event.type == pygame.KEYDOWN and |
39 | event.mod == 4160 and | 39 | event.mod == 4160 and |
40 | event.key == pygame.K_c): | 40 | event.key == pygame.K_c): |
41 | for thread in threading.enumerate(): | ||
42 | if thread is threading.current_thread(): | ||
43 | continue | ||
44 | thread.join() | ||
45 | |||
41 | pygame.quit() | 46 | pygame.quit() |
42 | sys.exit() | 47 | sys.exit() |
43 | 48 | ||