void OpenALRenderableSource::startPlayingImpl(Timestamp start) 
     throw(Exception)
 {
     if (!isPlayingImpl()) {
         // Make sure we have an attached sound
         attachALBuffers();
         
         // Tell the AL to start playing (from the specified position)
         clearAlError();
         ALuint als = getALSource();
         alSourcePlay(als);
         checkAlError();
         
         if (start != 0)
             seekImpl(start);
     }
 }
示例#2
0
MojErr MojDbIsamQuery::seek(bool& foundOut)
{
	MojAssert(m_state == StateSeek);

	// if descending, seek to upper bound, lower otherwise
	bool desc = m_plan->desc();
	const ByteVec& key = m_iter->key(desc).byteVec();
	m_state = StateNext;

	// if the last key returned while iterating over the previous range is >=
	// our first key, we can use our current position instead of seeking
	if (m_keySize > 0) {
		if ((compareKey(key) < 0) == desc) {
			foundOut = true;
			return MojErrNone;
		}
	}
	MojErr err = seekImpl(key, desc, foundOut);
	MojErrCheck(err);

	return MojErrNone;
}
示例#3
0
boost::uint64_t StageRandomIterator::skipImpl(boost::uint64_t numPts)
{
    uint64_t pos = m_index;
    pos = seekImpl(pos + numPts);
    return (pos - numPts);
}
示例#4
0
boost::uint64_t StageRandomIterator::seek(boost::uint64_t position)
{
    m_index = seekImpl(position);
    return m_index;
}
 void RenderableSource::seek(Timestamp time) 
     throw(Exception)
 {
     seekImpl(time);
 }