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;
55 IBufferQueue *thiz = (IBufferQueue *) self;
56 interface_lock_exclusive(thiz);
57 BufferHeader *oldRear = thiz->mRear, *newRear;
58 if ((newRear = oldRear + 1) == &thiz->mArray[thiz->mNumBuffers + 1]) {
59 newRear = thiz->mArray;
61 if (newRear == thiz->mFront) {
66 thiz->mRear = newRear;
67 ++thiz->mState.count;
71 interface_unlock_exclusive_attributes(thiz, ((SL_RESULT_SUCCESS == result) &&
72 (1 == thiz->mState.count) && (SL_PLAYSTATE_PLAYING == getAssociatedState(thiz))) ?
84 IBufferQueue *thiz = (IBufferQueue *) self;
85 interface_lock_exclusive(thiz);
88 if (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) {
89 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis;
95 thiz->mFront = &thiz->mArray[0];
96 thiz->mRear = &thiz->mArray[0];
97 thiz->mState.count = 0;
98 thiz->mState.playIndex = 0;
99 thiz->mSizeConsumed = 0;
100 thiz->mCallbackPending = false;
107 thiz->mClearRequested = SL_BOOLEAN_TRUE;
109 interface_cond_wait(thiz);
110 } while (thiz->mClearRequested);
113 interface_unlock_exclusive(thiz);
131 IBufferQueue *thiz = (IBufferQueue *) self;
133 interface_lock_shared(thiz);
135 state.count = thiz->mState.count;
136 state.playIndex = thiz->mState.playIndex;
138 state = thiz->mState;
140 interface_unlock_shared(thiz);
154 IBufferQueue *thiz = (IBufferQueue *) self;
155 interface_lock_exclusive(thiz);
157 if (SL_PLAYSTATE_STOPPED == getAssociatedState(thiz)) {
158 thiz->mCallback = callback;
159 thiz->mContext = pContext;
164 interface_unlock_exclusive(thiz);
179 IBufferQueue *thiz = (IBufferQueue *) self;
180 thiz->mItf = &IBufferQueue_Itf;
181 thiz->mState.count = 0;
182 thiz->mState.playIndex = 0;
183 thiz->mCallback = NULL;
184 thiz->mContext = NULL;
185 thiz->mNumBuffers = 0;
186 thiz->mClearRequested = SL_BOOLEAN_FALSE;
187 thiz->mArray = NULL;
188 thiz->mFront = NULL;
189 thiz->mRear = NULL;
191 thiz->mSizeConsumed = 0;
192 thiz->mCallbackPending = false;
194 BufferHeader *bufferHeader = thiz->mTypical;
209 IBufferQueue *thiz = (IBufferQueue *) self;
210 if ((NULL != thiz->mArray) && (thiz->mArray != thiz->mTypical)) {
211 free(thiz->mArray);
212 thiz->mArray = NULL;