Lines Matching refs:playerId

59 void ExitOnErrorFunc( SLresult result, int playerId, int line)  in ExitOnErrorFunc()  argument
62 if (playerId == -1) { in ExitOnErrorFunc()
66 result, line, playerId); in ExitOnErrorFunc()
206 void CreatePlayer(int playerId) { in CreatePlayer() argument
208 playerNum[playerId] = playerId; in CreatePlayer()
211 res = (*engineItf)->CreateAudioPlayer(engineItf, &audioPlayer[playerId], in CreatePlayer()
215 fprintf(stdout, "CreateAudioPlayer for player %d failed\n", playerId); in CreatePlayer()
216 validplayer[playerId] = false; in CreatePlayer()
219 validplayer[playerId] = true; in CreatePlayer()
222 res = (*audioPlayer[playerId])->Realize(audioPlayer[playerId], SL_BOOLEAN_FALSE); in CreatePlayer()
225 fprintf(stdout, "Realize for player %d failed\n", playerId); in CreatePlayer()
232 res = (*audioPlayer[playerId])->GetInterface(audioPlayer[playerId], SL_IID_PLAY, in CreatePlayer()
233 (void*)&playItfs[playerId]); in CreatePlayer()
234 CheckErrPlyr(res, playerId); in CreatePlayer()
236 res = (*audioPlayer[playerId])->GetInterface(audioPlayer[playerId], SL_IID_VOLUME, in CreatePlayer()
237 (void*)&volItfs[playerId]); in CreatePlayer()
238 CheckErrPlyr(res, playerId); in CreatePlayer()
240 res = (*audioPlayer[playerId])->GetInterface(audioPlayer[playerId], SL_IID_PREFETCHSTATUS, in CreatePlayer()
241 (void*)&prefetchItfs[playerId]); in CreatePlayer()
242 CheckErrPlyr(res, playerId); in CreatePlayer()
243 res = (*prefetchItfs[playerId])->RegisterCallback(prefetchItfs[playerId], PrefetchEventCallback, in CreatePlayer()
244 &playerNum[playerId]); in CreatePlayer()
245 CheckErrPlyr(res, playerId); in CreatePlayer()
246 res = (*prefetchItfs[playerId])->SetCallbackEventsMask(prefetchItfs[playerId], in CreatePlayer()
248 CheckErrPlyr(res, playerId); in CreatePlayer()
251 res = (*volItfs[playerId])->SetVolumeLevel( volItfs[playerId], -300); in CreatePlayer()
252 CheckErrPlyr(res, playerId); in CreatePlayer()
255 res = (*playItfs[playerId])->SetMarkerPosition(playItfs[playerId], 2000); in CreatePlayer()
256 CheckErrPlyr(res, playerId); in CreatePlayer()
257 res = (*playItfs[playerId])->SetPositionUpdatePeriod(playItfs[playerId], 500); in CreatePlayer()
258 CheckErrPlyr(res, playerId); in CreatePlayer()
259 res = (*playItfs[playerId])->SetCallbackEventsMask(playItfs[playerId], in CreatePlayer()
261 CheckErrPlyr(res, playerId); in CreatePlayer()
262 res = (*playItfs[playerId])->RegisterCallback(playItfs[playerId], PlayEventCallback, in CreatePlayer()
263 &playerNum[playerId]); in CreatePlayer()
264 CheckErrPlyr(res, playerId); in CreatePlayer()
267 (*prefetchItfs[playerId])->SetFillUpdatePeriod(prefetchItfs[playerId], 50); in CreatePlayer()
271 fprintf(stdout, "Setting player %d to PAUSED\n", playerId); in CreatePlayer()
272 res = (*playItfs[playerId])->SetPlayState( playItfs[playerId], SL_PLAYSTATE_PAUSED ); in CreatePlayer()
273 CheckErrPlyr(res, playerId); in CreatePlayer()
279 res = (*prefetchItfs[playerId])->GetPrefetchStatus(prefetchItfs[playerId], &prefetchStatus); in CreatePlayer()
280 CheckErrPlyr(res, playerId); in CreatePlayer()
285 fprintf(stderr, "Prefetch timed out for player %d\n", playerId); in CreatePlayer()
288 res = (*playItfs[playerId])->SetPlayState( playItfs[playerId], SL_PLAYSTATE_PLAYING ); in CreatePlayer()
289 CheckErrPlyr(res, playerId); in CreatePlayer()
293 res = (*playItfs[playerId])->GetDuration(playItfs[playerId], &durationInMsec); in CreatePlayer()
294 CheckErrPlyr(res, playerId); in CreatePlayer()
296 fprintf(stdout, "Content duration is unknown for player %d\n", playerId); in CreatePlayer()
298 fprintf(stdout, "Content duration is %u ms for player %d\n", durationInMsec, playerId); in CreatePlayer()
303 void DestroyPlayer(int playerId) { in DestroyPlayer() argument
304 fprintf(stdout, "About to destroy player %d\n", playerId); in DestroyPlayer()
306 (*audioPlayer[playerId])->Destroy(audioPlayer[playerId]); in DestroyPlayer()