Fix some compiler warning/errors with libs disabled

This commit is contained in:
bnnm 2018-12-01 18:34:23 +01:00
parent 7a5cf59951
commit a960a12e58
4 changed files with 13 additions and 9 deletions

View File

@ -30,7 +30,7 @@
**With GCC**: use the *./Makefile* in the root folder, see inside for options. For compilation flags check the *Makefile* in each folder.
You may need to manually rebuild if you change a *.h* file (use *make clean*).
In Linux, Makefiles can be used to cross-compile with the MingW headers, but may not be updated to generate native code at the moment. It should be fixable with some effort. Autotools should build it as vgmstream-cli instead (see the Audacious section).
In Linux, Makefiles can be used to cross-compile with the MingW headers, but may not be updated to generate native code at the moment. It should be fixable with some effort. Autotools should build it as vgmstream-cli instead (see the Audacious section). Some Linux distributions like Arch Linux include pre-patched vgmstream with most libraries, you may want that instead (see: https://aur.archlinux.org/packages/vgmstream-kode54-git/).
Windows CMD example:
```

View File

@ -1551,9 +1551,9 @@ static const unsigned int decode5_imdct_window_int[128] = {
static const float *decode5_imdct_window = (const float *)decode5_imdct_window_int;
static void decoder5_run_imdct(stChannel *ch, int subframe) {
const static unsigned int size = HCA_SAMPLES_PER_SUBFRAME;
const static unsigned int half = HCA_SAMPLES_PER_SUBFRAME / 2;
const static unsigned int mdct_bits = HCA_MDCT_BITS;
static const unsigned int size = HCA_SAMPLES_PER_SUBFRAME;
static const unsigned int half = HCA_SAMPLES_PER_SUBFRAME / 2;
static const unsigned int mdct_bits = HCA_MDCT_BITS;
/* apply DCT-IV to dequantized spectra */

View File

@ -15,11 +15,12 @@ VGMSTREAM * init_vgmstream_pos(STREAMFILE *streamFile) {
streamData = open_streamfile_by_ext(streamFile, "wav");
if (streamData) {
vgmstream = init_vgmstream_riff(streamData);
vgmstream = init_vgmstream_riff(streamData);
if (!vgmstream) goto fail;
vgmstream->meta_type = meta_RIFF_WAVE_POS;
}
else {
#ifdef VGM_USE_VORBIS
/* hack for Ogg with external loops */
streamData = open_streamfile_by_ext(streamFile, "ogg");
if (streamData) {
@ -29,6 +30,9 @@ VGMSTREAM * init_vgmstream_pos(STREAMFILE *streamFile) {
else {
goto fail;
}
#else
goto fail;
#endif
}
close_streamfile(streamData);

View File

@ -29,9 +29,6 @@ VGMSTREAM * init_vgmstream_ue4opus(STREAMFILE *streamFile) {
start_offset = 0x11;
data_size = get_streamfile_size(streamFile) - start_offset;
/* usually uses 60ms for music (delay of 360 samples) */
skip = ue4_opus_get_encoder_delay(start_offset, streamFile);
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count, loop_flag);
@ -39,10 +36,13 @@ VGMSTREAM * init_vgmstream_ue4opus(STREAMFILE *streamFile) {
vgmstream->meta_type = meta_UE4OPUS;
vgmstream->sample_rate = sample_rate;
vgmstream->num_samples = num_samples - skip;
#ifdef VGM_USE_FFMPEG
{
/* usually uses 60ms for music (delay of 360 samples) */
skip = ue4_opus_get_encoder_delay(start_offset, streamFile);
vgmstream->num_samples = num_samples - skip;
vgmstream->codec_data = init_ffmpeg_ue4_opus(streamFile, start_offset,data_size, vgmstream->channels, skip, vgmstream->sample_rate);
if (!vgmstream->codec_data) goto fail;
vgmstream->coding_type = coding_FFmpeg;