void invalidate();
bool isInvalid() const { return mIsInvalid; }
virtual bool isTimedTrack() const { return false; }
- bool isFastTrack() const { return (mFlags & IAudioFlinger::TRACK_FAST) != 0; }
int fastIndex() const { return mFastIndex; }
protected:
// audio HAL when this track will be fully rendered
// zero means not monitoring
private:
- IAudioFlinger::track_flags_t mFlags;
-
// The following fields are only for fast tracks, and should be in a subclass
int mFastIndex; // index within FastMixerState::mFastTracks[];
// either mFastIndex == -1 if not isFastTrack()
const sp<IMemory>& sharedBuffer,
int sessionId,
int uid,
+ IAudioFlinger::track_flags_t flags,
bool isOut,
bool useReadOnlyHeap = false);
virtual ~TrackBase();
virtual status_t setSyncEvent(const sp<SyncEvent>& event);
sp<IMemory> getBuffers() const { return mBufferMemory; }
+ bool isFastTrack() const { return (mFlags & IAudioFlinger::TRACK_FAST) != 0; }
protected:
TrackBase(const TrackBase&);
const int mSessionId;
int mUid;
Vector < sp<SyncEvent> >mSyncEvents;
+ const IAudioFlinger::track_flags_t mFlags;
const bool mIsOut;
ServerProxy* mServerProxy;
const int mId;
const sp<IMemory>& sharedBuffer,
int sessionId,
int clientUid,
+ IAudioFlinger::track_flags_t flags,
bool isOut,
bool useReadOnlyHeap)
: RefBase(),
mChannelCount * audio_bytes_per_sample(format) : sizeof(int8_t)),
mFrameCount(frameCount),
mSessionId(sessionId),
+ mFlags(flags),
mIsOut(isOut),
mServerProxy(NULL),
mId(android_atomic_inc(&nextTrackId)),
int uid,
IAudioFlinger::track_flags_t flags)
: TrackBase(thread, client, sampleRate, format, channelMask, frameCount, sharedBuffer,
- sessionId, uid, true /*isOut*/),
+ sessionId, uid, flags, true /*isOut*/),
mFillingUpStatus(FS_INVALID),
// mRetryCount initialized later when needed
mSharedBuffer(sharedBuffer),
mAuxBuffer(NULL),
mAuxEffectId(0), mHasVolumeController(false),
mPresentationCompleteFrames(0),
- mFlags(flags),
mFastIndex(-1),
mCachedVolume(1.0),
mIsInvalid(false),
size_t frameCount,
int sessionId,
int uid,
- bool isFast)
+ IAudioFlinger::track_flags_t flags)
: TrackBase(thread, client, sampleRate, format,
- channelMask, frameCount, 0 /*sharedBuffer*/, sessionId, uid, false /*isOut*/,
- isFast /*useReadOnlyHeap*/),
+ channelMask, frameCount, 0 /*sharedBuffer*/, sessionId, uid,
+ flags, false /*isOut*/,
+ (flags & IAudioFlinger::TRACK_FAST) != 0 /*useReadOnlyHeap*/),
mOverflow(false), mResampler(NULL), mRsmpOutBuffer(NULL), mRsmpOutFrameCount(0),
// See real initialization of mRsmpInFront at RecordThread::start()
mRsmpInUnrel(0), mRsmpInFront(0), mFramesToDrop(0), mResamplerBufferProvider(NULL)