## Sample(filename)

#### new Sample(filename)
`doc/classes.js`, `line 194`

  Load a WAV-file.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `filename` | string |

### Members

#### static bits
`doc/classes.js`, `line 210`

  Sound resolution.

#### static filename
`doc/classes.js`, `line 198`

  Name of the WAV.

#### static frequency
`doc/classes.js`, `line 206`

  Sound frequency.

#### static length
`doc/classes.js`, `line 202`

  Sound length.

#### static stereo
`doc/classes.js`, `line 214`

  mono/stereo indicator.

### Methods

#### Get(sample) → {number}
`doc/classes.js`, `line 232`

  Get sample data.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `sample` | number | index to return.

  ##### Returns:

  number - The sample value at that position. The sample data are always in unsigned format.

#### Play(volume, panning, loop) → {number}
`doc/classes.js`, `line 222`

  Play the WAV.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `volume` | number | between 0-255.
  `panning` | number | between (left) 0-255 (right).
  `loop` | boolean | true := sample will loop, false := sample will only be played once.

  ##### Returns:

  number - used voice number or null if not played.

#### Stop()
`doc/classes.js`, `line 226`

  Stop playing.