cleanup: misc

This commit is contained in:
bnnm 2024-08-10 23:43:41 +02:00
parent 0cb37f0dc7
commit a8163717d2
8 changed files with 16 additions and 19 deletions

9
.gitignore vendored
View File

@ -46,8 +46,8 @@ ipch
# build
/version_auto.h
/dependencies
/bin/**/*
/tmp/**/*
/bin
/tmp
/**/vgmstream-win.zip
/**/foo_input_vgmstream.fb2k-component
@ -64,10 +64,7 @@ CMakeFiles
/audacious/Makefile
cmake_install.cmake
#doc build
doc/INFO.md
doc/_build
# doc stuff
changelog.txt
formats-info.md
__pycache__

View File

@ -26,7 +26,7 @@ static FILE* get_output_file(const char* filename) {
}
static libvgmstream_streamfile_t* get_streamfile(const char* filename) {
return libvgmstream_streamfile_from_filename(filename);
return libvgmstream_streamfile_open_from_stdio(filename);
}
static int api_example(const char* infile) {
@ -204,10 +204,10 @@ static libvgmstream_streamfile_t* test_libsf_open() {
libvgmstream_streamfile_t* libsf = NULL;
libsf = libvgmstream_streamfile_from_filename("api.bin_wrong");
libsf = libvgmstream_streamfile_open_from_stdio("api.bin_wrong");
assert(libsf == NULL);
libsf = libvgmstream_streamfile_from_filename("api.bin");
libsf = libvgmstream_streamfile_open_from_stdio("api.bin");
assert(libsf != NULL);
return libsf;
@ -335,7 +335,7 @@ static void test_lib_tags() {
libvgmstream_tags_t* tags = NULL;
bool more = false;
libsf = libvgmstream_streamfile_from_filename("sample_!tags.m3u");
libsf = libvgmstream_streamfile_open_from_stdio("sample_!tags.m3u");
assert(libsf != NULL);
tags = libvgmstream_tags_init(libsf);

View File

@ -132,7 +132,7 @@ fail:
}
LIBVGMSTREAM_API libvgmstream_streamfile_t* libvgmstream_streamfile_from_filename(const char* filename) {
LIBVGMSTREAM_API libvgmstream_streamfile_t* libvgmstream_streamfile_open_from_stdio(const char* filename) {
STREAMFILE* sf = open_stdio_streamfile(filename);
if (!sf)
return NULL;

View File

@ -52,7 +52,7 @@ void describe_vgmstream(VGMSTREAM* vgmstream, char* desc, int length) {
}
if (vgmstream->channel_layout) {
int cl = vgmstream->channel_layout;
uint32_t cl = vgmstream->channel_layout;
/* not "channel layout: " to avoid mixups with "layout: " */
snprintf(temp,TEMPSIZE, "channel mask: 0x%x /", vgmstream->channel_layout);
@ -63,8 +63,8 @@ void describe_vgmstream(VGMSTREAM* vgmstream, char* desc, int length) {
if (cl & speaker_LFE) concatn(length,desc," LFE");
if (cl & speaker_BL) concatn(length,desc," BL");
if (cl & speaker_BR) concatn(length,desc," BR");
if (cl & speaker_FLC) concatn(length,desc," FLC");
if (cl & speaker_FRC) concatn(length,desc," FRC");
if (cl & speaker_FLC) concatn(length,desc," FLC"); //FCL is also common
if (cl & speaker_FRC) concatn(length,desc," FRC"); //FCR is also common
if (cl & speaker_BC) concatn(length,desc," BC");
if (cl & speaker_SL) concatn(length,desc," SL");
if (cl & speaker_SR) concatn(length,desc," SR");

View File

@ -34,7 +34,7 @@ static inline float get_fade_gain_curve(char shape, float index) {
break;
case 'Q': /* quarter of sine wave (for musical fades) */
gain = sin(index * MIXING_PI / 2.0f);
gain = sinf(index * MIXING_PI / 2.0f);
break;
case 'p': /* parabola (maybe for crossfades) */

View File

@ -6,7 +6,7 @@
// TODO decide if using float 1.0 style or 32767 style (fuzzy PCM changes when doing that)
static inline void sbuf_copy_s16_to_f32(float* buf_f32, int16_t* buf_s16, int samples, int channels) {
for (int s = 0; s < samples * channels; s++) {
buf_f32[s] = buf_s16[s]; // / 32767.0f
buf_f32[s] = (float)buf_s16[s]; // / 32767.0f
}
}

View File

@ -60,7 +60,7 @@ static inline void libvgmstream_streamfile_close(libvgmstream_streamfile_t* libs
}
LIBVGMSTREAM_API libvgmstream_streamfile_t* libvgmstream_streamfile_from_filename(const char* filename);
LIBVGMSTREAM_API libvgmstream_streamfile_t* libvgmstream_streamfile_open_from_stdio(const char* filename);
#endif
#endif

View File

@ -40,7 +40,7 @@ void build_extension_list(char* winamp_list, int winamp_list_size) {
for (i = 0; i < ext_list_len; i++) {
int used = add_extension(winamp_list, winamp_list_size - description_size, ext_list[i]);
if (used <= 0) {
vgm_logi("build_extension_list: not enough buf for all exts\n");
//vgm_logi("build_extension_list: not enough buf for all exts\n");
break;
}
winamp_list += used;