Next: Data types Up: 5 Sample playback Previous: 5 Sample playback

# Constants

This section describes all constants used in MIDAS sample playback. They are grouped according to the `enum` used to define them.

## 5.1.1 MIDASchannels

    enum MIDASchannels

### Description

These constants are used to indicate the channel number a sound should be played on. Legal channel numbers range from 0 upwards, depending on the number of open channels. In addition, MIDAS_CHANNEL_AUTO can be used with MIDASplaySample.

### Values

MIDAS_CHANNEL_AUTO
  Select channel automatically, used with MIDASplaySample
MIDAS_ILLEGAL_CHANNEL
  Illegal channel number, returned by MIDASallocateChannel as an error code.

## 5.1.2 MIDASloop

    enum MIDASloop

### Description

These constants are used to indicate the loop type of a sample or stream.

### Values

MIDAS_LOOP_NO
  Sample or stream does not loop
MIDAS_LOOP_YES
  Sample or stream loops

## 5.1.3 MIDASpanning

    enum MIDASpanning

### Description

These constants are used to describe the panning position of a sound. Legal panning positions range from -64 (extreme left) to 64 (extreme right), inclusive, plus MIDAS_PAN_SURROUND for surround sound.

### Values

MIDAS_PAN_LEFT
  Panning position full left
MIDAS_PAN_MIDDLE
  Panning position middle
MIDAS_PAN_RIGHT
  Panning position full right
MIDAS_PAN_SURROUND
  Surround sound

## 5.1.4 MIDASsamplePlayStatus

    enum MIDASsamplePlayStatus

### Description

These constants describe the possible sample playing status values returned by MIDASgetSamplePlayStatus.

### Values

MIDAS_SAMPLE_STOPPED
  The sample has stopped playing. Either the sample has ended, or another sample has taken its place (with automatic effect channels)
MIDAS_SAMPLE_PLAYING
  The sample is playing

## 5.1.5 MIDASsampleTypes

    enum MIDASsampleTypes

### Description

These constants identify different sample types. They are used with the functions MIDASloadRawSample, MIDASplayStreamFile and MIDASplayStreamPolling to indicate the format of the sample data. The byte order of the sample data is always the system native order (little endian for Intel x86 systems).

### Values

MIDAS_SAMPLE_8BIT_MONO
  8-bit mono sample, unsigned
MIDAS_SAMPLE_8BIT_STEREO
  8-bit stereo sample, unsigned
MIDAS_SAMPLE_16BIT_MONO
  16-bit mono sample, signed
MIDAS_SAMPLE_16BIT_STEREO
  16-bit stereo sample, signed
MIDAS_SAMPLE_ADPCM_MONO
  4-bit ADPCM mono sample (streams only)
MIDAS_SAMPLE_ADPCM_STEREO
  4-bit ADPCM stereo sample (streams only)
MIDAS_SAMPLE_ULAW_MONO
  8-bit mu-law mono sample
MIDAS_SAMPLE_ULAW_STEREO
  8-bit mu-law stereo sample

Next: Data types Up: 5 Sample playback Previous: 5 Sample playback