Beispiel #1
0
int CodecSet(codec* p, int No, const void* Data, int Size)
{
	int Result = ERR_INVALID_PARAM;
	switch (No)
	{
	case CODEC_INPUT: SETVALUE(p->In.Pin,pin,ERR_NONE); break;
	case CODEC_INPUT|PIN_FORMAT: SETPACKETFORMAT(p->In.Format,packetformat,UpdateInput(p)); break;
	case CODEC_OUTPUT: SETVALUE(p->Out.Pin,pin,ERR_NONE); break;
	case CODEC_OUTPUT|PIN_FORMAT: if (p->UpdateOutput) SETPACKETFORMAT(p->In.Format,packetformat,p->UpdateOutput(p)); break;
	case CODEC_OUTPUT|PIN_PROCESS: SETVALUE(p->Out.Process,packetprocess,ERR_NONE); break;
	case CODEC_COMMENT: SETVALUE(p->Comment,pin,ERR_NONE); break;
	case FLOW_FLUSH: Result = Flush(p); break;
	case FLOW_RESEND: if (p->ReSend) Result = p->ReSend(p); break;
	case FLOW_NOT_SUPPORTED: SETVALUE(p->NotSupported,pin,ERR_NONE); break;
	}
	return Result;
}
Beispiel #2
0
static int Set(nulloutput* p, int No, const void* Data, int Size)
{
	int Result = ERR_INVALID_PARAM;
	switch (No)
	{
	case OUT_INPUT: SETVALUE(p->Pin,pin,ERR_NONE); break;
	case OUT_INPUT|PIN_FORMAT: SETPACKETFORMAT(p->Format,packetformat,UpdateInput(p)); break;
	case OUT_TOTAL: SETVALUE(p->Total,int,ERR_NONE); break;
	case OUT_DROPPED: SETVALUE(p->Dropped,int,ERR_NONE); break;
	}
	return Result;
}
Beispiel #3
0
int WaveOutBaseSet(waveout_base* p, int No, const void* Data, int Size)
{
	int Result = ERR_INVALID_PARAM;
	switch (No)
	{
	case OUT_INPUT|PIN_FORMAT: SETPACKETFORMAT(p->Input,packetformat,UpdateInput(p)); break;
	case OUT_INPUT: SETVALUE(p->Pin,pin,ERR_NONE); break;
	case OUT_TOTAL: SETVALUE(p->Total,int,ERR_NONE); break;
	case OUT_DROPPED: SETVALUE(p->Dropped,int,ERR_NONE); break;
	case AOUT_STEREO: SETVALUECMP(p->Stereo,int,UpdateInput(p),EqInt); break; 
	case AOUT_QUALITY: SETVALUECMP(p->Quality,int,UpdateInput(p),EqInt); break;
	}
	return Result;
}
Beispiel #4
0
int CodecIDCTSet(codecidct* p, int No, const void* Data, int Size)
{
	node* Advanced;
	int Result = ERR_INVALID_PARAM;
	switch (No)
	{
	case CODECIDCT_INPUT: SETVALUE(p->In.Pin,pin,ERR_NONE); break;
	case CODECIDCT_INPUT|PIN_FORMAT: SETPACKETFORMAT(p->In.Format,packetformat,UpdateInput(p)); break;
	case CODECIDCT_IDCT:
		assert(Size==sizeof(idct*));
		Result = SetIDCT(p,*(idct**)Data);
		break;

	case FLOW_NOT_SUPPORTED: SETVALUE(p->NotSupported,pin,ERR_NONE); break;
	case FLOW_FLUSH: Result = Flush(p); break;
	case NODE_SETTINGSCHANGED:
		Advanced = Context()->Advanced;
		if (Advanced)
			Advanced->Get(Advanced,ADVANCED_DROPTOL,&p->DropTolerance,sizeof(tick_t));
		break;
	}
	return Result;
}