Ejemplo n.º 1
0
			public override void Render(float[] floatLeftChannel,float[] floatRightChannel)
			{
				if ((soundOutRender == null) || (soundOutRender.SoundInputs[0] == null)) {
					if (nullSoundRender == null) nullSoundRender = new NullSoundRender();
					nullSoundRender.Render(floatLeftChannel,floatRightChannel);
				}
				else
					soundOutRender.SoundInputs[0].Render(floatLeftChannel,floatRightChannel);
			}
Ejemplo n.º 2
0
		public SoundBlock(int numSoundInputs, int numMidiInputs) 
		{
			if (!(this is NullSoundRender)) {
				string[] temp = this.GetType().ToString().Split('.');
				string classname = temp[temp.Length-1].Replace("SoundRender","").Replace("Render","");
				name = classname + id.ToString(); id++;
			}
			soundInputs = new ISoundRender[numSoundInputs];
			for(int i=0; i<numSoundInputs; i++) soundInputs[i] = new NullSoundRender();
			midiInputs = new IMidiRender[numMidiInputs];
			for(int i=0; i<numMidiInputs; i++) midiInputs[i] = new NullMidiRender();
		}