# When you re-load and play a new sound with minim, the old sound will still play ...?

**URL:** <https://discourse.processing.org/t/when-you-re-load-and-play-a-new-sound-with-minim-the-old-sound-will-still-play/18280>\
**Category:** Libraries\
**Created:** [March 1, 2020, 4:31pm UTC](https://discourse.processing.org/t/when-you-re-load-and-play-a-new-sound-with-minim-the-old-sound-will-still-play/18280 "2020-03-01T16:31:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EvilDuck](https://avatars.discourse-cdn.com/v4/letter/e/f04885/32.png) [@EvilDuck](https://discourse.processing.org/u/EvilDuck)\
**Post date:** [March 1, 2020, 4:31pm UTC](https://discourse.processing.org/t/when-you-re-load-and-play-a-new-sound-with-minim-the-old-sound-will-still-play/18280/1 "2020-03-01T16:31:28Z")

</div>

I have this; a new sound is loaded, the old one will still play  
can this be fixed, or is it just the way minim works … ?

I want to be able to load a new sound to save memory

Code:

```auto
  for ( int i = 0; i < 2; i++ ) {
    if ( this.countMP3Renewed > 0) { 
      player[i].mute();
      player[i].close();
    }

    // problem!, when new sound has been loaded, the old one will still play!
    player[i] = minim.loadFile( soundNames[i] );
    player[i].setGain( -40 );
    player[i].loop();
  }

```

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 1, 2020, 8:16pm UTC](https://discourse.processing.org/t/when-you-re-load-and-play-a-new-sound-with-minim-the-old-sound-will-still-play/18280/2 "2020-03-01T20:16:15Z")

</div>

just say stop() before loading?

---

<div class="post-metadata">

**Author:** ![EvilDuck](https://avatars.discourse-cdn.com/v4/letter/e/f04885/32.png) [@EvilDuck](https://discourse.processing.org/u/EvilDuck)\
**Post date:** [March 2, 2020, 5:39pm UTC](https://discourse.processing.org/t/when-you-re-load-and-play-a-new-sound-with-minim-the-old-sound-will-still-play/18280/3 "2020-03-02T17:39:20Z")

</div>

I did a minim.stop();  
And this fixed the issue!, thx!
