# Minim setting volume of an audioPlayer

**URL:** <https://discourse.processing.org/t/minim-setting-volume-of-an-audioplayer/3596>\
**Category:** Libraries\
**Created:** [September 17, 2018, 9:48am UTC](https://discourse.processing.org/t/minim-setting-volume-of-an-audioplayer/3596 "2018-09-17T09:48:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/colin/32/230_2.png) [@colin](https://discourse.processing.org/u/colin)\
**Post date:** [September 17, 2018, 8:22pm UTC](https://discourse.processing.org/t/minim-setting-volume-of-an-audioplayer/3596/5 "2018-09-17T20:22:11Z")

</div>

I’m using this doc [http://code.compartmental.net/minim/](http://code.compartmental.net/minim/)  
Is it outdated ?

Anyway the following works. The second error was due to the play() function called in the setup().

```auto
Minim minim;
AudioPlayer player;
static final int FADE = 2500;

void setup() {
  
  minim = new Minim(this);
  player = minim.loadFile("walk.wav");

}

void draw() {
  
  player.play();
  player.shiftGain(player.getGain(),-80,FADE);
  
}

```

---

_[View the full topic](https://discourse.processing.org/t/minim-setting-volume-of-an-audioplayer/3596)._
