Lines Matching refs:newStream
151 Stream *newStream = nullptr; in queueForPlay() local
160 newStream = stream; in queueForPlay()
165 if (newStream == nullptr) { in queueForPlay()
167 newStream = *mAvailableStreams.begin(); in queueForPlay()
169 newStream->setStopTimeNs(systemTime()); in queueForPlay()
174 if (newStream == nullptr || newStream->getSoundID() != soundID) { in queueForPlay()
179 newStream = stream; in queueForPlay()
182 } else if (newStream == nullptr) { in queueForPlay()
184 newStream = stream; in queueForPlay()
191 if (newStream == nullptr) { in queueForPlay()
194 if (newStream == nullptr in queueForPlay()
195 || newStream->getPriority() > stream->getPriority()) { in queueForPlay()
196 newStream = stream; in queueForPlay()
201 if (newStream != nullptr) { // we need to mute as it is still playing. in queueForPlay()
202 (void)newStream->requestStop(newStream->getStreamID()); in queueForPlay()
207 if (newStream == nullptr) { in queueForPlay()
211 newStream = stream; in queueForPlay()
219 if (newStream == nullptr) { in queueForPlay()
224 Stream *pairStream = newStream->getPairStream(); in queueForPlay()
227 __func__, newStream, pairStream, streamID); in queueForPlay()
231 removeFromQueues_l(newStream); in queueForPlay()
232 mProcessingStreams.emplace(newStream); in queueForPlay()
234 if (Stream* nextStream = newStream->playPairStream()) { in queueForPlay()
240 mAvailableStreams.insert(newStream); in queueForPlay()
243 mProcessingStreams.erase(newStream); in queueForPlay()
245 launchThread = moveToRestartQueue_l(newStream) && needMoreThreads_l(); in queueForPlay()