Skip to content

Commit

Permalink
Added some error messages for playchannel
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 19, 2002
1 parent b22ef13 commit 86d4649
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mixer.c
Expand Up @@ -619,6 +619,7 @@ int Mix_PlayChannelTimed(int which, Mix_Chunk *chunk, int loops, int ticks)

/* Don't play null pointers :-) */
if ( chunk == NULL ) {
Mix_SetError("Tried to play a NULL chunk");
return(-1);
}

Expand All @@ -632,6 +633,7 @@ int Mix_PlayChannelTimed(int which, Mix_Chunk *chunk, int loops, int ticks)
break;
}
if ( i == num_channels ) {
Mix_SetError("No free channels available");
which = -1;
} else {
which = i;
Expand Down

0 comments on commit 86d4649

Please sign in to comment.