[Change] Disabled the unable to play sound warnings to not scare people
on the last collective missions.
This commit is contained in:
parent
b7cfc2bac2
commit
d4d40f63ff
20
src/sound.c
20
src/sound.c
@ -233,8 +233,10 @@ int sound_play(int sound) {
|
|||||||
|
|
||||||
v->channel = Mix_PlayChannel(-1, sound_list[sound].buffer, 0);
|
v->channel = Mix_PlayChannel(-1, sound_list[sound].buffer, 0);
|
||||||
|
|
||||||
|
/*
|
||||||
if(v->channel < 0)
|
if(v->channel < 0)
|
||||||
WARN("Unable to play sound: %s", Mix_GetError());
|
WARN("Unable to play sound: %s", Mix_GetError());
|
||||||
|
*/
|
||||||
|
|
||||||
v->state = VOICE_PLAYING;
|
v->state = VOICE_PLAYING;
|
||||||
v->id = ++voice_genid;
|
v->id = ++voice_genid;
|
||||||
@ -277,16 +279,18 @@ int sound_playPos(int sound, double x, double y) {
|
|||||||
v->channel = Mix_PlayChannel(-1, sound_list[sound].buffer, 0);
|
v->channel = Mix_PlayChannel(-1, sound_list[sound].buffer, 0);
|
||||||
|
|
||||||
if(v->channel < 0) {
|
if(v->channel < 0) {
|
||||||
|
/*
|
||||||
WARN("Unable to play sound: %s", Mix_GetError());
|
WARN("Unable to play sound: %s", Mix_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
*/
|
||||||
|
} else {
|
||||||
/* Need to make sure distance doesn't overflow. */
|
/* Need to make sure distance doesn't overflow. */
|
||||||
idist = (int)dist / 13.;
|
idist = (int)dist / 13.;
|
||||||
if(idist > 255) idist = 255;
|
if(idist > 255) idist = 255;
|
||||||
if(Mix_SetPosition(v->channel, (Sint16)angle, (Uint8)idist) < 0) {
|
if(Mix_SetPosition(v->channel, (Sint16)angle, (Uint8)idist) < 0) {
|
||||||
WARN("Unable to set sound position: %s", Mix_GetError());
|
WARN("Unable to set sound position: %s", Mix_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Actually add the voice to the list. */
|
/* Actually add the voice to the list. */
|
||||||
|
Loading…
Reference in New Issue
Block a user