mac_ErrorExit("Sorry, support only 16-bit sound.");
mac_ErrorExit("\pSorry, support only 16-bit sound.");
static int output_data (char *buf, int32 nbytes){	short			err,headerLen;	//long			len = count;	int32			samples;	long			offset;	SndCommand		theCmd;		if( gCursorIsWatch ){		InitCursor();	gCursorIsWatch=false;	}#ifdef MAC_INITIAL_FILLING	// start INITIAL FILLING	if( play_counter==0 && filling_flag==0 && do_initial_filling){		filling_flag=1;		theCmd.cmd=pauseCmd; SndDoImmediate(gSndCannel, &theCmd);	}#endif		samples = nbytes;	if (!(dpm.encoding & PE_MONO)) /* Stereo sample */	{		samples /= 2;		//len *= 2;	}	if (dpm.encoding & PE_16BIT)		samples /= 2;	else		mac_ErrorExit("Sorry, support only 16-bit sound.");		//s32tos16 (buf, count);	/*power mac always 16bit*/		if( nbytes>MACBUFSIZE)		mac_ErrorExit("\pTiMidity Error--sound packet is too large");		err= SetupSndHeader((SndListHandle)soundHandle[nextBuf],			dpm.encoding & PE_MONO? 1:2,				dpm.rate<<16, 16, 'NONE',					60, nbytes, &headerLen);	if( err )		mac_ErrorExit("\pTiMidity Error--Cannot make Sound");	BlockMoveData(buf, *(soundHandle[nextBuf])+headerLen, nbytes);		err= GetSoundHeaderOffset((SndListHandle)(soundHandle[nextBuf]), &offset);	if( err )		mac_ErrorExit("\pTiMidity Error--Cannot make Sound");	theCmd.cmd= bufferCmd;	theCmd.param2=(long)( *(soundHandle[nextBuf])+offset);		QuingSndCommand(gSndCannel, &theCmd);	nextBuf++; mac_buf_using_num++;	if( nextBuf>=MACBUFNUM ) nextBuf=0;	theCmd.cmd= callBackCmd;	// post set	theCmd.param1= 0;	theCmd.param2= samples;	QuingSndCommand(gSndCannel, &theCmd);	play_mode->extra_param[0] += samples;	return 0; /*good*/}