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); } }
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; }
boost::uint64_t StageRandomIterator::skipImpl(boost::uint64_t numPts) { uint64_t pos = m_index; pos = seekImpl(pos + numPts); return (pos - numPts); }
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); }