don't unlock player queue in playerStop(), playerWait()

There is no caller of these two functions which locks the player
queue; replace the playerQueueUnlock() call with an assertion.
This commit is contained in:
Max Kellermann 2008-08-26 08:27:17 +02:00
parent 113c1c0af5
commit f168695699

View File

@ -61,19 +61,23 @@ void playerPlay(Song * song)
void playerStop(void) void playerStop(void)
{ {
assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED);
if (pc.state != PLAYER_STATE_STOP) if (pc.state != PLAYER_STATE_STOP)
player_command(PLAYER_COMMAND_STOP); player_command(PLAYER_COMMAND_STOP);
pc.queueState = PLAYER_QUEUE_BLANK; pc.queueState = PLAYER_QUEUE_BLANK;
playerQueueUnlock();
} }
void playerWait(void) void playerWait(void)
{ {
player_command(PLAYER_COMMAND_CLOSE_AUDIO); player_command(PLAYER_COMMAND_CLOSE_AUDIO);
assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED);
player_command(PLAYER_COMMAND_CLOSE_AUDIO);
pc.queueState = PLAYER_QUEUE_BLANK; pc.queueState = PLAYER_QUEUE_BLANK;
playerQueueUnlock();
} }
void playerKill(void) void playerKill(void)