Lines Matching refs:track
45 static SLboolean track_check(Track *track) in track_check() argument
47 assert(NULL != track); in track_check()
50 CAudioPlayer *audioPlayer = track->mAudioPlayer; in track_check()
58 assert(audioPlayer->mTrack == track); in track_check()
60 SLuint32 framesMixed = track->mFramesMixed; in track_check()
62 track->mFramesMixed = 0; in track_check()
78 track->mReader = NULL; in track_check()
79 track->mAvail = 0; in track_check()
87 unsigned i = track - outputMix->mOutputMixExt.mTracks; in track_check()
90 track->mAudioPlayer = NULL; in track_check()
102 if (0 < track->mAvail) { in track_check()
111 track->mReader = oldFront->mBuffer; in track_check()
112 track->mAvail = oldFront->mSize; in track_check()
123 track->mGains[0] = audioPlayer->mGains[0]; in track_check()
124 track->mGains[1] = audioPlayer->mGains[1]; in track_check()
138 track->mReader = oldFront->mBuffer; in track_check()
139 track->mAvail = oldFront->mSize; in track_check()
200 Track *track = &thiz->mTracks[i]; in IOutputMixExt_FillBuffer() local
204 if (!track_check(track)) { in IOutputMixExt_FillBuffer()
216 float gain = track->mGains[channel]; in IOutputMixExt_FillBuffer()
230 if (track->mAvail < actual) { in IOutputMixExt_FillBuffer()
231 actual = track->mAvail; in IOutputMixExt_FillBuffer()
235 assert(NULL != track->mReader); in IOutputMixExt_FillBuffer()
237 const stereo *source = (const stereo *) track->mReader; in IOutputMixExt_FillBuffer()
244 mixBuffer->left += (short) (source->left * track->mGains[0]); in IOutputMixExt_FillBuffer()
245 mixBuffer->right += (short) (source->right * track->mGains[1]); in IOutputMixExt_FillBuffer()
258 mixBuffer->left = (short) (source->left * track->mGains[0]); in IOutputMixExt_FillBuffer()
259 mixBuffer->right = (short) (source->right * track->mGains[1]); in IOutputMixExt_FillBuffer()
263 memcpy(dstWriter, track->mReader, actual); in IOutputMixExt_FillBuffer()
270 track->mReader = (char *) track->mReader + actual; in IOutputMixExt_FillBuffer()
271 track->mAvail -= actual; in IOutputMixExt_FillBuffer()
272 if (track->mAvail == 0) { in IOutputMixExt_FillBuffer()
273 IBufferQueue *bufferQueue = &track->mAudioPlayer->mBufferQueue; in IOutputMixExt_FillBuffer()
291 track->mReader = newFront->mBuffer; in IOutputMixExt_FillBuffer()
292 track->mAvail = newFront->mSize; in IOutputMixExt_FillBuffer()
308 track->mFramesMixed += actual >> 2; // sizeof(short) * STEREO_CHANNELS in IOutputMixExt_FillBuffer()
312 if (track_check(track)) { in IOutputMixExt_FillBuffer()
344 Track *track = &thiz->mTracks[0]; in IOutputMixExt_init() local
346 for (i = 0; i < MAX_TRACK; ++i, ++track) { in IOutputMixExt_init()
347 track->mAudioPlayer = NULL; in IOutputMixExt_init()
383 Track *track = NULL; in IOutputMixExt_checkAudioPlayerSourceSink() local
401 track = &omExt->mTracks[i]; in IOutputMixExt_checkAudioPlayerSourceSink()
402 track->mAudioPlayer = NULL; // only field that is accessed before full initialization in IOutputMixExt_checkAudioPlayerSourceSink()
404 thiz->mTrack = track; in IOutputMixExt_checkAudioPlayerSourceSink()
414 assert(NULL != track); in IOutputMixExt_checkAudioPlayerSourceSink()
415 track->mBufferQueue = &thiz->mBufferQueue; in IOutputMixExt_checkAudioPlayerSourceSink()
416 track->mAudioPlayer = thiz; in IOutputMixExt_checkAudioPlayerSourceSink()
417 track->mReader = NULL; in IOutputMixExt_checkAudioPlayerSourceSink()
418 track->mAvail = 0; in IOutputMixExt_checkAudioPlayerSourceSink()
419 track->mGains[0] = 1.0f; in IOutputMixExt_checkAudioPlayerSourceSink()
420 track->mGains[1] = 1.0f; in IOutputMixExt_checkAudioPlayerSourceSink()
421 track->mFramesMixed = 0; in IOutputMixExt_checkAudioPlayerSourceSink()