From eadaf21bde9e383ae94123d41c3e27d0bb507043 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 14 May 2023 20:17:51 +0200 Subject: [PATCH] internal cleanup (move files) --- audacious/plugin.cc | 2 +- cli/vgmstream123.c | 2 +- cli/vgmstream_cli.c | 2 +- doc/BUILD.md | 2 +- fb2k/foo_vgmstream.cpp | 2 +- src/api.h | 6 +++- src/{ => base}/decode.c | 6 ++-- src/{ => base}/decode.h | 2 +- src/base/info.c | 2 +- src/{ => base}/mixing.c | 4 +-- src/{ => base}/mixing.h | 2 +- src/{ => base}/plugins.c | 4 +-- src/{ => base}/plugins.h | 4 +-- src/{ => base}/render.c | 4 +-- src/{ => base}/render.h | 2 +- src/{ => base}/seek.c | 4 +-- src/layout/blocked.c | 2 +- src/layout/flat.c | 2 +- src/layout/interleave.c | 2 +- src/layout/layered.c | 6 ++-- src/layout/segmented.c | 6 ++-- src/libvgmstream.vcxproj | 18 +++++------ src/libvgmstream.vcxproj.filters | 54 ++++++++++++++++---------------- src/meta/txtp.c | 4 +-- src/vgmstream.c | 6 ++-- winamp/in_vgmstream.h | 2 +- xmplay/xmp_vgmstream.c | 2 +- 27 files changed, 79 insertions(+), 75 deletions(-) rename src/{ => base}/decode.c (99%) rename src/{ => base}/decode.h (98%) rename src/{ => base}/mixing.c (99%) rename src/{ => base}/mixing.h (98%) rename src/{ => base}/plugins.c (99%) rename src/{ => base}/plugins.h (98%) rename src/{ => base}/render.c (99%) rename src/{ => base}/render.h (88%) rename src/{ => base}/seek.c (99%) diff --git a/audacious/plugin.cc b/audacious/plugin.cc index a773f937..95383583 100644 --- a/audacious/plugin.cc +++ b/audacious/plugin.cc @@ -16,7 +16,7 @@ extern "C" { #include "../src/vgmstream.h" -#include "../src/plugins.h" +#include "../src/api.h" } #include "plugin.h" #include "vfs.h" diff --git a/cli/vgmstream123.c b/cli/vgmstream123.c index 8992419b..191a7bb2 100644 --- a/cli/vgmstream123.c +++ b/cli/vgmstream123.c @@ -38,7 +38,7 @@ #endif #include "../src/vgmstream.h" -#include "../src/plugins.h" +#include "../src/api.h" #include "../src/util/samples_ops.h" #include "../version.h" diff --git a/cli/vgmstream_cli.c b/cli/vgmstream_cli.c index a76964a8..5f47c71d 100644 --- a/cli/vgmstream_cli.c +++ b/cli/vgmstream_cli.c @@ -5,7 +5,7 @@ #include #include "../src/vgmstream.h" -#include "../src/plugins.h" +#include "../src/api.h" #include "../src/util.h" #include "../src/util/samples_ops.h" //todo use <>? diff --git a/doc/BUILD.md b/doc/BUILD.md index 225a8aaa..26bf9fe3 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -10,7 +10,7 @@ vgmstream can be compiled using one of several build scripts that are available Because each module has different quirks one can't use a single tool for everything. You should be able to build most using a standard *compiler* (GCC/MSVC/Clang) using common *build systems* (scripts/CMake/autotools) in any typical *OS* (Windows/Linux/macOS). -64-bit support should work but hasn't been throughly tested (may have subtle decoding bugs in some codecs), since most used components are plugins for 32-bit players. Windows libraries for extra codecs are included for 32-bit only at the moment. +64-bit support should work but hasn't been as throughly tested, since most used components are plugins for 32-bit players. Windows libraries for extra codecs are included for 32-bit only at the moment. Though it's rather flexible (like using Windows with GCC and autotools), some combos may be a bit more complex to get working depending on your system and other factors. diff --git a/fb2k/foo_vgmstream.cpp b/fb2k/foo_vgmstream.cpp index 421ae85c..928e483f 100644 --- a/fb2k/foo_vgmstream.cpp +++ b/fb2k/foo_vgmstream.cpp @@ -12,7 +12,7 @@ extern "C" { #include "../src/vgmstream.h" -#include "../src/plugins.h" +#include "../src/api.h" } #include "foo_vgmstream.h" #include "foo_filetypes.h" diff --git a/src/api.h b/src/api.h index b9a9f69d..c96d705d 100644 --- a/src/api.h +++ b/src/api.h @@ -1,6 +1,10 @@ -//possible future public/opaque API #ifndef _API_H_ #define _API_H_ + +#include "base/plugins.h" + + +//possible future public/opaque API #if 0 #include diff --git a/src/decode.c b/src/base/decode.c similarity index 99% rename from src/decode.c rename to src/base/decode.c index 0aefcf9b..3f95c96a 100644 --- a/src/decode.c +++ b/src/base/decode.c @@ -1,7 +1,7 @@ -#include "vgmstream.h" +#include "../vgmstream.h" +#include "../layout/layout.h" +#include "../coding/coding.h" #include "decode.h" -#include "layout/layout.h" -#include "coding/coding.h" #include "mixing.h" #include "plugins.h" diff --git a/src/decode.h b/src/base/decode.h similarity index 98% rename from src/decode.h rename to src/base/decode.h index 01adf358..14e6e859 100644 --- a/src/decode.h +++ b/src/base/decode.h @@ -1,7 +1,7 @@ #ifndef _DECODE_H #define _DECODE_H -#include "vgmstream.h" +#include "../vgmstream.h" void free_codec(VGMSTREAM* vgmstream); void seek_codec(VGMSTREAM* vgmstream); diff --git a/src/base/info.c b/src/base/info.c index 5d7f5ede..5ee86a47 100644 --- a/src/base/info.c +++ b/src/base/info.c @@ -1,7 +1,7 @@ #include #include "../vgmstream.h" #include "../coding/coding.h" -#include "../mixing.h" +#include "mixing.h" #include "../util/channel_mappings.h" diff --git a/src/mixing.c b/src/base/mixing.c similarity index 99% rename from src/mixing.c rename to src/base/mixing.c index 896197f6..17ae4397 100644 --- a/src/mixing.c +++ b/src/base/mixing.c @@ -1,7 +1,7 @@ -#include "vgmstream.h" +#include "../vgmstream.h" +#include "../util/channel_mappings.h" #include "mixing.h" #include "plugins.h" -#include "util/channel_mappings.h" #include #include diff --git a/src/mixing.h b/src/base/mixing.h similarity index 98% rename from src/mixing.h rename to src/base/mixing.h index e563c5b4..d63d7645 100644 --- a/src/mixing.h +++ b/src/base/mixing.h @@ -1,7 +1,7 @@ #ifndef _MIXING_H_ #define _MIXING_H_ -#include "vgmstream.h" +#include "../vgmstream.h" /* Applies mixing commands to the sample buffer. Mixing must be externally enabled and * outbuf must big enough to hold output_channels*samples_to_do */ diff --git a/src/plugins.c b/src/base/plugins.c similarity index 99% rename from src/plugins.c rename to src/base/plugins.c index a30412f7..c78ad6cc 100644 --- a/src/plugins.c +++ b/src/base/plugins.c @@ -1,7 +1,7 @@ -#include "vgmstream.h" +#include "../vgmstream.h" +#include "../util/log.h" #include "plugins.h" #include "mixing.h" -#include "util/log.h" /* ****************************************** */ diff --git a/src/plugins.h b/src/base/plugins.h similarity index 98% rename from src/plugins.h rename to src/base/plugins.h index b160e8d5..dbc25c79 100644 --- a/src/plugins.h +++ b/src/base/plugins.h @@ -4,8 +4,8 @@ #ifndef _PLUGINS_H_ #define _PLUGINS_H_ -#include "streamfile.h" -#include "vgmstream.h" +#include "../streamfile.h" +#include "../vgmstream.h" /* ****************************************** */ diff --git a/src/render.c b/src/base/render.c similarity index 99% rename from src/render.c rename to src/base/render.c index 06e9af44..94afd5bf 100644 --- a/src/render.c +++ b/src/base/render.c @@ -1,5 +1,5 @@ -#include "vgmstream.h" -#include "layout/layout.h" +#include "../vgmstream.h" +#include "../layout/layout.h" #include "render.h" #include "decode.h" #include "mixing.h" diff --git a/src/render.h b/src/base/render.h similarity index 88% rename from src/render.h rename to src/base/render.h index 4a3b1de3..93fb388a 100644 --- a/src/render.h +++ b/src/base/render.h @@ -1,7 +1,7 @@ #ifndef _RENDER_H #define _RENDER_H -#include "vgmstream.h" +#include "../vgmstream.h" void free_layout(VGMSTREAM* vgmstream); void reset_layout(VGMSTREAM* vgmstream); diff --git a/src/seek.c b/src/base/seek.c similarity index 99% rename from src/seek.c rename to src/base/seek.c index 46ef3abc..9a271eb4 100644 --- a/src/seek.c +++ b/src/base/seek.c @@ -1,5 +1,5 @@ -#include "vgmstream.h" -#include "layout/layout.h" +#include "../vgmstream.h" +#include "../layout/layout.h" #include "render.h" #include "decode.h" #include "mixing.h" diff --git a/src/layout/blocked.c b/src/layout/blocked.c index 395af40e..bac084ec 100644 --- a/src/layout/blocked.c +++ b/src/layout/blocked.c @@ -1,6 +1,6 @@ #include "layout.h" #include "../vgmstream.h" -#include "../decode.h" +#include "../base/decode.h" #include "../coding/coding.h" diff --git a/src/layout/flat.c b/src/layout/flat.c index ff3001b7..603281c1 100644 --- a/src/layout/flat.c +++ b/src/layout/flat.c @@ -1,6 +1,6 @@ #include "layout.h" #include "../vgmstream.h" -#include "../decode.h" +#include "../base/decode.h" /* Decodes samples for flat streams. diff --git a/src/layout/interleave.c b/src/layout/interleave.c index 0714d6d9..1c8ba0ae 100644 --- a/src/layout/interleave.c +++ b/src/layout/interleave.c @@ -1,6 +1,6 @@ #include "layout.h" #include "../vgmstream.h" -#include "../decode.h" +#include "../base/decode.h" /* Decodes samples for interleaved streams. diff --git a/src/layout/layered.c b/src/layout/layered.c index 5e057045..e6221b74 100644 --- a/src/layout/layered.c +++ b/src/layout/layered.c @@ -1,8 +1,8 @@ #include "layout.h" #include "../vgmstream.h" -#include "../decode.h" -#include "../mixing.h" -#include "../plugins.h" +#include "../base/decode.h" +#include "../base/mixing.h" +#include "../base/plugins.h" #define VGMSTREAM_MAX_LAYERS 255 #define VGMSTREAM_LAYER_SAMPLE_BUFFER 8192 diff --git a/src/layout/segmented.c b/src/layout/segmented.c index 97d32add..85a61740 100644 --- a/src/layout/segmented.c +++ b/src/layout/segmented.c @@ -1,8 +1,8 @@ #include "layout.h" #include "../vgmstream.h" -#include "../decode.h" -#include "../mixing.h" -#include "../plugins.h" +#include "../base/decode.h" +#include "../base/mixing.h" +#include "../base/plugins.h" #define VGMSTREAM_MAX_SEGMENTS 1024 #define VGMSTREAM_SEGMENT_SAMPLE_BUFFER 8192 diff --git a/src/libvgmstream.vcxproj b/src/libvgmstream.vcxproj index 19bf7900..31cf0f61 100644 --- a/src/libvgmstream.vcxproj +++ b/src/libvgmstream.vcxproj @@ -81,15 +81,15 @@ - - - - + + + + @@ -184,16 +184,16 @@ - - - - - + + + + + diff --git a/src/libvgmstream.vcxproj.filters b/src/libvgmstream.vcxproj.filters index c89f2c33..aee5e93d 100644 --- a/src/libvgmstream.vcxproj.filters +++ b/src/libvgmstream.vcxproj.filters @@ -68,18 +68,6 @@ Header Files - - Header Files - - - Header Files - - - Header Files - - - Header Files - Header Files @@ -95,6 +83,18 @@ Header Files + + base\Header Files + + + base\Header Files + + + base\Header Files + + + base\Header Files + coding\Header Files @@ -373,24 +373,9 @@ - - Source Files - Source Files - - Source Files - - - Source Files - - - Source Files - - - Source Files - Source Files @@ -400,9 +385,24 @@ Source Files + + base\Source Files + base\Source Files + + base\Source Files + + + base\Source Files + + + base\Source Files + + + base\Source Files + coding\Source Files diff --git a/src/meta/txtp.c b/src/meta/txtp.c index 69f5e50f..e6d382b1 100644 --- a/src/meta/txtp.c +++ b/src/meta/txtp.c @@ -1,8 +1,8 @@ #include "meta.h" #include "../coding/coding.h" #include "../layout/layout.h" -#include "../mixing.h" -#include "../plugins.h" +#include "../base/mixing.h" +#include "../base/plugins.h" #include "../util/text_reader.h" #include diff --git a/src/vgmstream.c b/src/vgmstream.c index a2f6a6c4..bf1573b8 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -9,9 +9,9 @@ #include "meta/meta.h" #include "layout/layout.h" #include "coding/coding.h" -#include "decode.h" -#include "render.h" -#include "mixing.h" +#include "base/decode.h" +#include "base/render.h" +#include "base/mixing.h" static void try_dual_file_stereo(VGMSTREAM* opened_vgmstream, STREAMFILE* sf, VGMSTREAM* (*init_vgmstream_function)(STREAMFILE*)); diff --git a/winamp/in_vgmstream.h b/winamp/in_vgmstream.h index da6e388f..c30663f2 100644 --- a/winamp/in_vgmstream.h +++ b/winamp/in_vgmstream.h @@ -22,7 +22,7 @@ #include #include "../src/vgmstream.h" -#include "../src/plugins.h" +#include "../src/api.h" #include "sdk/in2.h" #include "sdk/wa_ipc.h" #include "sdk/ipc_pe.h" diff --git a/xmplay/xmp_vgmstream.c b/xmplay/xmp_vgmstream.c index 1e35e93c..ddc5e0fb 100644 --- a/xmplay/xmp_vgmstream.c +++ b/xmplay/xmp_vgmstream.c @@ -13,7 +13,7 @@ #include "xmpin.h" #include "../src/vgmstream.h" -#include "../src/plugins.h" +#include "../src/api.h" #include "../version.h"