effort to have no warnings once again
This commit is contained in:
@ -126,6 +126,8 @@ static union AudioContext init_audio_context(const char *path, AudioFileType typ
|
||||
};
|
||||
}
|
||||
|
||||
case AUDIO_FILE_TYPE_UNKNOWN:
|
||||
case AUDIO_FILE_TYPE_COUNT:
|
||||
default:
|
||||
CRY("Audio error", "Unhandled audio format (in init)");
|
||||
return (union AudioContext){0};
|
||||
@ -147,6 +149,8 @@ static void repeat_audio(AudioChannel *channel) {
|
||||
break;
|
||||
}
|
||||
|
||||
case AUDIO_FILE_TYPE_UNKNOWN:
|
||||
case AUDIO_FILE_TYPE_COUNT:
|
||||
default:
|
||||
CRY("Audio error", "Unhandled audio format (in repeat)");
|
||||
break;
|
||||
@ -219,6 +223,8 @@ TWN_API void audio_set(const char *channel, AudioParam param, float value) {
|
||||
}
|
||||
pair->value.panning = value;
|
||||
break;
|
||||
default:
|
||||
CRY("Audio channel parameter setting failed", "Invalid parameter enum given");
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,8 +235,8 @@ static void audio_mixin_streams(const AudioChannel *channel,
|
||||
uint8_t *restrict b,
|
||||
size_t frames)
|
||||
{
|
||||
float *const sa = (float *)a;
|
||||
float *const sb = (float *)b;
|
||||
float *const sa = (float *)(void *)a;
|
||||
float *const sb = (float *)(void *)b;
|
||||
|
||||
const float left_panning = fminf(fabsf(channel->panning - 1.0f), 1.0f);
|
||||
const float right_panning = fminf(fabsf(channel->panning + 1.0f), 1.0f);
|
||||
@ -321,6 +327,8 @@ static void audio_sample_and_mixin_channel(const AudioChannel *channel,
|
||||
break;
|
||||
}
|
||||
|
||||
case AUDIO_FILE_TYPE_UNKNOWN:
|
||||
case AUDIO_FILE_TYPE_COUNT:
|
||||
default:
|
||||
CRY("Audio error", "Unhandled audio format (in sampling)");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user