mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 08:20:54 +01:00
Fix some compiler warning/errors with libs disabled
This commit is contained in:
parent
7a5cf59951
commit
a960a12e58
@ -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.
|
**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*).
|
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:
|
Windows CMD example:
|
||||||
```
|
```
|
||||||
|
@ -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 const float *decode5_imdct_window = (const float *)decode5_imdct_window_int;
|
||||||
|
|
||||||
static void decoder5_run_imdct(stChannel *ch, int subframe) {
|
static void decoder5_run_imdct(stChannel *ch, int subframe) {
|
||||||
const static unsigned int size = HCA_SAMPLES_PER_SUBFRAME;
|
static const unsigned int size = HCA_SAMPLES_PER_SUBFRAME;
|
||||||
const static unsigned int half = HCA_SAMPLES_PER_SUBFRAME / 2;
|
static const unsigned int half = HCA_SAMPLES_PER_SUBFRAME / 2;
|
||||||
const static unsigned int mdct_bits = HCA_MDCT_BITS;
|
static const unsigned int mdct_bits = HCA_MDCT_BITS;
|
||||||
|
|
||||||
|
|
||||||
/* apply DCT-IV to dequantized spectra */
|
/* apply DCT-IV to dequantized spectra */
|
||||||
|
@ -20,6 +20,7 @@ VGMSTREAM * init_vgmstream_pos(STREAMFILE *streamFile) {
|
|||||||
vgmstream->meta_type = meta_RIFF_WAVE_POS;
|
vgmstream->meta_type = meta_RIFF_WAVE_POS;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#ifdef VGM_USE_VORBIS
|
||||||
/* hack for Ogg with external loops */
|
/* hack for Ogg with external loops */
|
||||||
streamData = open_streamfile_by_ext(streamFile, "ogg");
|
streamData = open_streamfile_by_ext(streamFile, "ogg");
|
||||||
if (streamData) {
|
if (streamData) {
|
||||||
@ -29,6 +30,9 @@ VGMSTREAM * init_vgmstream_pos(STREAMFILE *streamFile) {
|
|||||||
else {
|
else {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
goto fail;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
close_streamfile(streamData);
|
close_streamfile(streamData);
|
||||||
|
@ -29,9 +29,6 @@ VGMSTREAM * init_vgmstream_ue4opus(STREAMFILE *streamFile) {
|
|||||||
start_offset = 0x11;
|
start_offset = 0x11;
|
||||||
data_size = get_streamfile_size(streamFile) - start_offset;
|
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 */
|
/* build the VGMSTREAM */
|
||||||
vgmstream = allocate_vgmstream(channel_count, loop_flag);
|
vgmstream = allocate_vgmstream(channel_count, loop_flag);
|
||||||
@ -39,10 +36,13 @@ VGMSTREAM * init_vgmstream_ue4opus(STREAMFILE *streamFile) {
|
|||||||
|
|
||||||
vgmstream->meta_type = meta_UE4OPUS;
|
vgmstream->meta_type = meta_UE4OPUS;
|
||||||
vgmstream->sample_rate = sample_rate;
|
vgmstream->sample_rate = sample_rate;
|
||||||
vgmstream->num_samples = num_samples - skip;
|
|
||||||
|
|
||||||
#ifdef VGM_USE_FFMPEG
|
#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);
|
vgmstream->codec_data = init_ffmpeg_ue4_opus(streamFile, start_offset,data_size, vgmstream->channels, skip, vgmstream->sample_rate);
|
||||||
if (!vgmstream->codec_data) goto fail;
|
if (!vgmstream->codec_data) goto fail;
|
||||||
vgmstream->coding_type = coding_FFmpeg;
|
vgmstream->coding_type = coding_FFmpeg;
|
||||||
|
Loading…
Reference in New Issue
Block a user