/*
 * Mix.c
 *		User Primitive Code for MODE on Objectworks\Smalltalk R4
 *			C-language Mixer driver
 *
 * Copyright (C) 1991, Stephen Travis Pope, Nomad Computer Music Research.
 *		All rights reserved.
 *
 *			V4.0: File created: 8/24/91--stp
 */
#include "userprim.h"					/* Basic ST80 UP header */
#include "MODE_Primitives.h"		/* Declarations of MODE UP fcns */


/*		----Mix>>mixing			*/
/*		mixCollection: aCollectionofEventAssociations into: aSound		*/
/*			"Perform the mix of the given elements, creating a new sound."	*/
/*			"Mix engine"			*/

void ModeMixRun (receiverMix, elements, resultSound)
upHandle receiverMix, elements, resultSound; {
	upHandle uiBytes, element, samples, startSample, stopSample;
	int count, i, sample, start, stop;

	ModeCheckSound(resultSound, uiBytes)
	count = UPindexVarSize(elements);
	if ((count <= 0) || (count >= 100))
		UPfail(-4);

}
