title: How to stop sound in MATLAB?
body: <p>When playing a sound using e.g:</p>
  
  <pre><code>sound(x,fs);
  </code></pre>
  
  <p>I sometimes by accident play the wrong one. If x is of substantial length, I currently try to wait until the sound has completed. Any suggestions on how to "abort" the playback? I've already tried</p>
  
  <pre><code>sound(mute,fs); % Mute is a short vector containing all zeroes
  </code></pre>
  
  <p>But that didn't work. I'm using Windows by the way.</p>
  
  <p><b>UPDATE:</b><br>
  The following solution proposed by kigurai seems to do the trick:</p>
  
  <pre><code>sound(x,fs); % Start the audio
  </code></pre>
  
  <p>Now kill audio by</p>
  
  <pre><code>clear playsnd
  </code></pre>