tFix Cocoa sounds being played only once - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 641b4fb6e0b1c489981182d2a5f94305503805f3
 (DIR) parent b7b017640b47d311c77eac2f0bd60e7f65286db1
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Wed, 11 Nov 2020 21:17:26 -0800
       
       Fix Cocoa sounds being played only once
       
       Previously any given sound was only played once
       with the Cocoa (Mac) sound plugin. Fix this by
       explicitly stopping the playback of any previous
       sound first.
       
       Diffstat:
         M src/plugins/sound_cocoa.m           |       2 ++
       
       1 file changed, 2 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/plugins/sound_cocoa.m b/src/plugins/sound_cocoa.m
       t@@ -54,6 +54,8 @@ static void SoundPlay_Cocoa(const gchar *snd)
            p = [[NSSound alloc] initWithContentsOfFile:sound byReference:YES];
            [play_by_name setObject:p forKey:sound];
          }
       +  /* First, stop any currently playing sound */
       +  [p stop];
          [p play];
        }