Conversation
|
What does this fix? I think the idea was that you keep track of the pause state in UI and call pause / play accordingly. Maybe not the most intuitive interface. Perhaps I could consider changing the implementation like this: - (void)pause
{
if (_wasPaused) {
[self play];
} else {
_wasPaused = YES;
_audioStream->pause();
}
}
|
|
This fixes a "non restart" of a continuous stream if it was paused (is not anymore) and an audio interruption occurs (like siri). The value of _wasPaused is used only in line 766 and 959. But IMHO it doesn't make sense to handle it like this. why would someone not have his stream restarted after an audio interruption ? Why should my stream never attempt to restart? Remember that this is the behavior if you paused and resumed the stream at least once in the past. Thinking about that, this fix makes the _wasPaused a _isPaused. |
if pause acts as play/pause toggle _wasPaused should get updated.
if pause acts as play/pause toggle _wasPaused should get updated.