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

11
.gitignore vendored
View File

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

View File

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

View File

@ -52,7 +52,7 @@ void describe_vgmstream(VGMSTREAM* vgmstream, char* desc, int length) {
} }
if (vgmstream->channel_layout) { if (vgmstream->channel_layout) {
int cl = vgmstream->channel_layout; uint32_t cl = vgmstream->channel_layout;
/* not "channel layout: " to avoid mixups with "layout: " */ /* not "channel layout: " to avoid mixups with "layout: " */
snprintf(temp,TEMPSIZE, "channel mask: 0x%x /", vgmstream->channel_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_LFE) concatn(length,desc," LFE");
if (cl & speaker_BL) concatn(length,desc," BL"); if (cl & speaker_BL) concatn(length,desc," BL");
if (cl & speaker_BR) concatn(length,desc," BR"); if (cl & speaker_BR) concatn(length,desc," BR");
if (cl & speaker_FLC) concatn(length,desc," FLC"); if (cl & speaker_FLC) concatn(length,desc," FLC"); //FCL is also common
if (cl & speaker_FRC) concatn(length,desc," FRC"); if (cl & speaker_FRC) concatn(length,desc," FRC"); //FCR is also common
if (cl & speaker_BC) concatn(length,desc," BC"); if (cl & speaker_BC) concatn(length,desc," BC");
if (cl & speaker_SL) concatn(length,desc," SL"); if (cl & speaker_SL) concatn(length,desc," SL");
if (cl & speaker_SR) concatn(length,desc," SR"); 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; break;
case 'Q': /* quarter of sine wave (for musical fades) */ case 'Q': /* quarter of sine wave (for musical fades) */
gain = sin(index * MIXING_PI / 2.0f); gain = sinf(index * MIXING_PI / 2.0f);
break; break;
case 'p': /* parabola (maybe for crossfades) */ 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) // 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) { 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++) { 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
#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++) { for (i = 0; i < ext_list_len; i++) {
int used = add_extension(winamp_list, winamp_list_size - description_size, ext_list[i]); int used = add_extension(winamp_list, winamp_list_size - description_size, ext_list[i]);
if (used <= 0) { 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; break;
} }
winamp_list += used; winamp_list += used;