/* GSI - general sound interface
 *
 * pcm_data.h
 *
 * ** GSI data types specification **
 *
 *
 * 1996-1999 by W.H.Scholten
 *
 * This file is released to the public domain.
 */


#ifndef _GSI__pcm_data_h
#define _GSI__pcm_data_h

/*---------------------------------------------------------------------------*
 *      GSI data types etc.
 *---------------------------------------------------------------------------*/
#define GSI_LITTLE_ENDIAN  1
#define GSI_BIG_ENDIAN     2


/* pcm mode & file types: */
#define GSI_8BIT_ALAW                 0
#define GSI_8BIT_MULAW                1
#define GSI_8BIT                      2 /* unsigned 8 bit (pcm may use signed) */
#define GSI_16BIT                     3 /* signed 16 bit (files MSB, pcm native) */
#define GSI_24BIT                     4 /* signed 24 bit (files MSB, pcm native) */

/* The following are used to denote file formats only: */
#define GSI_4BIT_ADPCM                8 /* CCITT G.721 ADPCM */
#define GSI_3BIT_ADPCM                9 /* CCITT G.723 ADPCM */
#define GSI_5BIT_ADPCM               10 /* CCITT G.723 ADPCM */

#define GSI_8BIT_SIGNED               5 /* signed 8 bit */
#define GSI_16BIT_LE                  6 /* signed 16 bit LSB */
#define GSI_24BIT_LE                  7 /* signed 24 bit LSB */
/* rename to GSI_FORMAT_8BIT_MULAW, GSI_FORMAT_MONO etc ? */

#define GSI_FLOAT32                  11 /* files stored in MSB format, pcm native */
#define GSI_FLOAT32_LE               12 /* stored in LSB format */
#define GSI_24BIT_FLOATING           11
#define GSI_24BIT_LE_FLOATING        12

#define GSI_UNKNOWN_FORMAT          255
#define GSI_NUM_SAMPLE_TYPES   13 /* number of types = 1+ highest number above */


/* pcm/file channels: */
#define GSI_MONO                      1
#define GSI_STEREO                    2
#define GSI_3CHANNEL                  3 /* Left, Right, Middle */
#define GSI_QUAD                      4 /* front L,R, rear L,R */
#define GSI_4CHANNEL                  GSI_QUAD
#define GSI_SURROUND4                 5 /* L, M, R, surround */
#define GSI_SURROUND6                 6 /* L, LM, M, R, RM, surround */
#define GSI_8CHANNEL                  8 /* True 3d sound */

#define _GSI_CHANNEL_TYPES   7 /* number of types = 1+ highest number above */


/* Time types: */
#define GSI_SONG_MILLISECONDS         0
#define GSI_SONG_TICKS                1

#define GSI_SAMPLE_MICROSECONDS       0
#define GSI_SAMPLE_METASAMPLES        1 /* a meta sample is 4 bytes for stereo 16 bit etc */


#endif /* _GSI__pcm_data_h */
