Lines Matching refs:thiz

26 static SLuint32 getAssociatedState(IBufferQueue *thiz)
29 switch (InterfaceToObjectID(thiz)) {
31 state = ((CAudioPlayer *) thiz->mThis)->mPlay.mState;
34 state = ((CAudioRecorder *) thiz->mThis)->mRecord.mState;
56 IBufferQueue *thiz = (IBufferQueue *) self;
57 interface_lock_exclusive(thiz);
58 BufferHeader *oldRear = thiz->mRear, *newRear;
59 if ((newRear = oldRear + 1) == &thiz->mArray[thiz->mNumBuffers + 1]) {
60 newRear = thiz->mArray;
62 if (newRear == thiz->mFront) {
67 thiz->mRear = newRear;
68 ++thiz->mState.count;
72 interface_unlock_exclusive_attributes(thiz, ((SL_RESULT_SUCCESS == result) &&
73 (1 == thiz->mState.count) && (SL_PLAYSTATE_PLAYING == getAssociatedState(thiz))) ?
85 IBufferQueue *thiz = (IBufferQueue *) self;
86 interface_lock_exclusive(thiz);
89 if (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) {
90 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis;
94 thiz->mFront = &thiz->mArray[0];
95 thiz->mRear = &thiz->mArray[0];
96 thiz->mState.count = 0;
97 thiz->mState.playIndex = 0;
98 thiz->mSizeConsumed = 0;
106 thiz->mClearRequested = SL_BOOLEAN_TRUE;
108 interface_cond_wait(thiz);
109 } while (thiz->mClearRequested);
112 interface_unlock_exclusive(thiz);
127 IBufferQueue *thiz = (IBufferQueue *) self;
129 interface_lock_shared(thiz);
131 state.count = thiz->mState.count;
132 state.playIndex = thiz->mState.playIndex;
134 state = thiz->mState;
136 interface_unlock_shared(thiz);
150 IBufferQueue *thiz = (IBufferQueue *) self;
151 interface_lock_exclusive(thiz);
153 if (SL_PLAYSTATE_STOPPED == getAssociatedState(thiz)) {
154 thiz->mCallback = callback;
155 thiz->mContext = pContext;
160 interface_unlock_exclusive(thiz);
175 IBufferQueue *thiz = (IBufferQueue *) self;
176 thiz->mItf = &IBufferQueue_Itf;
177 thiz->mState.count = 0;
178 thiz->mState.playIndex = 0;
179 thiz->mCallback = NULL;
180 thiz->mContext = NULL;
181 thiz->mNumBuffers = 0;
182 thiz->mClearRequested = SL_BOOLEAN_FALSE;
183 thiz->mArray = NULL;
184 thiz->mFront = NULL;
185 thiz->mRear = NULL;
187 thiz->mSizeConsumed = 0;
189 BufferHeader *bufferHeader = thiz->mTypical;
204 IBufferQueue *thiz = (IBufferQueue *) self;
205 if ((NULL != thiz->mArray) && (thiz->mArray != thiz->mTypical)) {
206 free(thiz->mArray);
207 thiz->mArray = NULL;