/* sod2, a player for polychannel .csf music files.
 * Copyright (C) 1995 Russell Marks. See sod2.c for license details.
 *
 * config.h - array sizes and configuration.
 *
 * Please contact me if you think any of the limits here are too small.
 * Despite the need for limits, I would like to keep using arrays in
 * general to keep the access speed up.
 */

/************************** PATH SETTINGS ***************************/

/* This path fragment is always checked (last) whether SOD2_SAMPLE_PATH
 * is set or not.
 */
#define MINIMUM_SAMPLE_PATH	".:/usr/local/lib/sod2-samples"


/************************* BUFFER SETTINGS **************************/

/* These are limits on, and configuration of, the buffer used
 * if _ALLOW_BUFFERING is defined. These settings are not used
 * unless buffering is allowed.
 */

/* The buffer size to be malloc()'d. */
#define BUFFER_SIZE	2*1024*1024

/* Size of block to write to audio device. */
#define BUF_WRITE	16384

/* SNDCTL_DSP_SETFRAGMENT arg appropriate for above setting.
 * This setting gives two 16k fragments.
 * This should really be a macro, I suppose.
 */
#define BUF_FRAG_ARG	0x2000E


/*********************** ARRAY SIZE SETTINGS ************************/

/* These settings set array sizes used by sod2 for storing patterns,
 * notes, etc. It is unlikely you will need to change these.
 */

/* Max pattern length.
 * Using more than 64 notes in a pattern is a *very* bad idea.
 * You should only use pattern lengths of less than 64 when
 * using different time signatures such as 6/8, 5/4, 7/8 etc.
 * Currently you can only use one pattern length per track.
 */
#define MAX_BLOCKSIZE	64

/* Max number of patterns.
 * This should be reasonable.
 */
#define MAX_PATTERNS	256

/* Max number of lines.
 * This may be a limitation:
 * At the default tempo of 125 bpm and default pattern size of 64 notes,
 * this makes the maximum track length about 32 mins 46 sec.
 */
#define MAX_LINES	256

/* Max patterns played at once.
 * This is much the same as a 64-track recorder. :-)
 */
#define MAX_LINE_DEPTH	64

/* Max notes played at once.
 * I doubt this will be much of a limitation either. :-)
 * Decreasing this won't make sod2 faster, as only array entries being
 * used are looked at.
 */
#define MAX_NOTES	2048

/* Max samples that can be loaded/used.
 * This is plenty unless you're doing something very weird.
 */
#define MAX_SAMPLES	256
