public synchronized ZePlayoutElement<E> get() {
		
		/* sample current absolute time. */
		now = playoutToSystem();
		leftInterval = now-playoutHalfPer;
		rightInterval = now+playoutHalfPer;

		/* sample it once from the master and use
		 * the same value for the whole playout request
		 * to avoid inconsistencies (mpo can be changed by
		 * the master at any time)
		 */
		long mpo = master.mpo;
		
		//System.out.println(Long.toString(mpo+first().wallclock)+
		//		" interval:"+Long.toString(leftInterval)+":"+Long.toString(rightInterval));
		
		while ( !isEmpty() ) {
			if ((first().wallclock+mpo) < leftInterval) {
				E s = pollFirst();
				System.out.println(Long.toString(mpo+s.wallclock)+
						" interval:"+Long.toString(leftInterval)+":"+Long.toString(rightInterval)+" -> "+
						"late skipped from sensor "+s.sensorId);
				skipped++;
				if (s.duplicate) duplicatesSkipped++;
			}
			else if ( (first().wallclock+mpo) >= leftInterval && 
					(first().wallclock+mpo) <= rightInterval ) {
				resetHoldCount();
				current = pollFirst();
				ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
				elem.element = current;
				elem.meaning = Registry.PLAYOUT_VALID;
				System.out.println(Long.toString(mpo+current.wallclock)+
						" interval:"+Long.toString(leftInterval)+":"+Long.toString(rightInterval)+" -> "+
						"played from sensor "+current.sensorId);
				played++;
				return elem;
			}
			else { //samples to be played in the future is at queue head
				if (current != null) { //playout started
					if (now < current.expiry+mpo) { //current not expired
						//current still valid: hold it
						holdcount++;
						ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
						elem.element = null;
						elem.meaning = Registry.PLAYOUT_HOLD;
						return elem;
					} else {
						resetHoldCount();
						ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
						elem.element = null;
						elem.meaning = Registry.PLAYOUT_INVALID;
						return elem;
					}
				} else {
				//System.out.println("Giving invalidate");
					resetHoldCount();
					ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
					elem.element = null;
					elem.meaning = Registry.PLAYOUT_INVALID;
					return elem;
				}
			}
		}
		
		//nothing found in the queue
		if (current != null) { //playout started
			if (now < current.expiry+mpo) { //current not expired
				//found empty but current still valid: holding
				holdcount++;
				ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
				elem.element = null;
				elem.meaning = Registry.PLAYOUT_HOLD;
				return elem;
			}
			else {
				//found empty and current expired: underflow
				underflowCount++;
				ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
				elem.element = null;
				elem.meaning = Registry.PLAYOUT_INVALID;
				return elem;
			}
		}
		//Found empty but playout not yet started
		ZePlayoutElement<E> elem = new ZePlayoutElement<E>();
		elem.element = null;
		elem.meaning = Registry.PLAYOUT_NOTSTARTED;
		return elem;		
	}