From 71f7b4d96b84b58f1cb064ba754b18dcac4077d9 Mon Sep 17 00:00:00 2001 From: hanez Date: Mon, 26 Oct 2026 23:07:03 +0100 Subject: [PATCH] Project refactoring changed xtlite to xtc everywhere. --- Makefile | 26 +++++++++---------- README.md | 6 ++--- docs/BUILD.md | 4 +-- docs/IDEA.md | 18 ++++++------- include/{xtlite/xtlite.h => xtc/xtc.h} | 12 ++++----- .../xtlite_engine.h => xtc/xtc_engine.h} | 6 ++--- .../xtlite_project.h => xtc/xtc_project.h} | 6 ++--- .../xtlite_types.h => xtc/xtc_types.h} | 4 +-- include/xtc/xtc_version.h | 7 +++++ include/xtlite/xtlite_version.h | 7 ----- src/core/{xtlite.c => xtc.c} | 2 +- src/graph/graph.c | 2 +- src/gui/main_window.cpp | 4 +-- src/gui/main_window.hpp | 4 +-- src/main.c | 6 ++--- tests/unit/test_core.c | 6 ++--- 16 files changed, 60 insertions(+), 60 deletions(-) rename include/{xtlite/xtlite.h => xtc/xtc.h} (67%) rename include/{xtlite/xtlite_engine.h => xtc/xtc_engine.h} (93%) rename include/{xtlite/xtlite_project.h => xtc/xtc_project.h} (84%) rename include/{xtlite/xtlite_types.h => xtc/xtc_types.h} (89%) create mode 100644 include/xtc/xtc_version.h delete mode 100644 include/xtlite/xtlite_version.h rename src/core/{xtlite.c => xtc.c} (97%) diff --git a/Makefile b/Makefile index 69b9bd7..b633a54 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ CXXFLAGS ?= -O2 -g CXXFLAGS += -std=c++17 -Wall -Wextra -Wpedantic -Iinclude LDFLAGS ?= -CORE_SOURCES := src/core/xtlite.c src/graph/graph.c src/dsp/gain.c src/engine/offline_engine.c +CORE_SOURCES := src/core/xtc.c src/graph/graph.c src/dsp/gain.c src/engine/offline_engine.c CORE_OBJECTS := $(CORE_SOURCES:%.c=$(BUILD_DIR)/%.o) TEST_OBJECT := $(BUILD_DIR)/tests/unit/test_core.o ifeq ($(shell $(PKG_CONFIG) --exists fltk 2>/dev/null && echo yes),yes) @@ -25,12 +25,12 @@ GUI_AVAILABLE := yes endif .PHONY: all clean test debug gui install -all: $(BUILD_DIR)/libxtlite.a $(BUILD_DIR)/xtlite-check +all: $(BUILD_DIR)/libxtc.a $(BUILD_DIR)/xtc-check -$(BUILD_DIR)/xtlite-check: $(BUILD_DIR)/src/main.o $(BUILD_DIR)/libxtlite.a +$(BUILD_DIR)/xtc-check: $(BUILD_DIR)/src/main.o $(BUILD_DIR)/libxtc.a $(CC) $(LDFLAGS) -o $@ $^ -lm -$(BUILD_DIR)/libxtlite.a: $(CORE_OBJECTS) +$(BUILD_DIR)/libxtc.a: $(CORE_OBJECTS) @mkdir -p $(@D) $(AR) rcs $@ $^ @@ -46,20 +46,20 @@ $(TEST_OBJECT): tests/unit/test_core.c @mkdir -p $(@D) $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ -$(BUILD_DIR)/test_core: $(TEST_OBJECT) $(BUILD_DIR)/libxtlite.a - $(CC) $(LDFLAGS) -o $@ $(TEST_OBJECT) $(BUILD_DIR)/libxtlite.a -lm +$(BUILD_DIR)/test_core: $(TEST_OBJECT) $(BUILD_DIR)/libxtc.a + $(CC) $(LDFLAGS) -o $@ $(TEST_OBJECT) $(BUILD_DIR)/libxtc.a -lm -test: $(BUILD_DIR)/test_core $(BUILD_DIR)/xtlite-check +test: $(BUILD_DIR)/test_core $(BUILD_DIR)/xtc-check ./$(BUILD_DIR)/test_core - ./$(BUILD_DIR)/xtlite-check + ./$(BUILD_DIR)/xtc-check debug: $(MAKE) BUILD_DIR="$(BUILD_DIR)/debug" CFLAGS="$(CFLAGS) -O0 -g3" CXXFLAGS="$(CXXFLAGS) -O0 -g3" all test ifeq ($(GUI_AVAILABLE),yes) -gui: $(BUILD_DIR)/xtlite +gui: $(BUILD_DIR)/xtc -$(BUILD_DIR)/xtlite: $(BUILD_DIR)/src/gui/main.o $(BUILD_DIR)/src/gui/main_window.o $(BUILD_DIR)/libxtlite.a +$(BUILD_DIR)/xtc: $(BUILD_DIR)/src/gui/main.o $(BUILD_DIR)/src/gui/main_window.o $(BUILD_DIR)/libxtc.a $(CXX) $(LDFLAGS) -o $@ $^ $(FLTK_LIBS) -lm else gui: @@ -68,9 +68,9 @@ gui: endif install: all - install -d "$(DESTDIR)$(PREFIX)/include/xtlite" "$(DESTDIR)$(PREFIX)/lib" - install -m 0644 include/xtlite/*.h "$(DESTDIR)$(PREFIX)/include/xtlite/" - install -m 0644 "$(BUILD_DIR)/libxtlite.a" "$(DESTDIR)$(PREFIX)/lib/" + install -d "$(DESTDIR)$(PREFIX)/include/xtc" "$(DESTDIR)$(PREFIX)/lib" + install -m 0644 include/xtc/*.h "$(DESTDIR)$(PREFIX)/include/xtc/" + install -m 0644 "$(BUILD_DIR)/libxtc.a" "$(DESTDIR)$(PREFIX)/lib/" clean: rm -rf "$(BUILD_DIR)" diff --git a/README.md b/README.md index 64ba83b..35b8b0d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # xtc — a lightweight, modular DAW -`xtlite` is a new, energyXT-inspired digital audio workstation project. It is not a clone and contains no energyXT source code or assets. +`xtc` is a new, energyXT-inspired digital audio workstation project. It is not a clone and contains no energyXT source code or assets. ## Design decisions @@ -31,7 +31,7 @@ make make test ``` -`make` also builds `build/xtlite-check`, a headless core startup/shutdown +`make` also builds `build/xtc-check`, a headless core startup/shutdown check. Use `make debug` for a separate debug build and test run. See [docs/BUILD.md](docs/BUILD.md) for the inspected toolchain and baseline limits. @@ -44,7 +44,7 @@ make gui Run the GUI: ```sh -./build/xtlite +./build/xtc ``` The current GUI is only a shell and does not yet produce sound. The core's offline graph test is the first executable audio-processing milestone. diff --git a/docs/BUILD.md b/docs/BUILD.md index abea58e..81066dd 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -1,6 +1,6 @@ # Build baseline -Phase 0 retains the existing layout: public C headers in `include/xtlite`, +Phase 0 retains the existing layout: public C headers in `include/xtc`, C implementation modules under `src`, optional C++ GUI under `src/gui`, and tests under `tests`. `src/main.c` is a minimal headless startup/shutdown check; it does not initialize audio devices or open a GUI. @@ -9,7 +9,7 @@ it does not initialize audio devices or open a GUI. ```sh make clean all test -./build/xtlite-check +./build/xtc-check make debug make gui ``` diff --git a/docs/IDEA.md b/docs/IDEA.md index e414b09..dc5902d 100644 --- a/docs/IDEA.md +++ b/docs/IDEA.md @@ -132,7 +132,7 @@ The C core and audio engine may be separate libraries or clearly separated modul Adapt this to an existing repository instead of replacing it blindly. ```text -xtlite/ +xtc/ ├── README.md ├── LICENSE ├── Makefile @@ -147,12 +147,12 @@ xtlite/ │ ├── 0002-c-core-fltk-gui.md │ └── 0003-realtime-thread-rules.md ├── include/ -│ └── xtlite/ -│ ├── xtlite.h -│ ├── xtlite_types.h -│ ├── xtlite_project.h -│ ├── xtlite_engine.h -│ └── xtlite_version.h +│ └── xtc/ +│ ├── xtc.h +│ ├── xtc_types.h +│ ├── xtc_project.h +│ ├── xtc_engine.h +│ └── xtc_version.h ├── src/ │ ├── core/ │ ├── project/ @@ -222,8 +222,8 @@ Keep C and C++ files clearly separated. C headers exposed to C++ must use `exter Example API shape (illustrative only; refine after reviewing the actual codebase): ```c -#ifndef XTLITE_H -#define XTLITE_H +#ifndef XTC_H +#define XTC_H #ifdef __cplusplus extern "C" { diff --git a/include/xtlite/xtlite.h b/include/xtc/xtc.h similarity index 67% rename from include/xtlite/xtlite.h rename to include/xtc/xtc.h index 1c25f9a..551b90b 100644 --- a/include/xtlite/xtlite.h +++ b/include/xtc/xtc.h @@ -1,15 +1,15 @@ -#ifndef XTLITE_H -#define XTLITE_H +#ifndef XTC_H +#define XTC_H -#include "xtlite_types.h" +#include "xtc_types.h" #ifdef __cplusplus extern "C" { #endif -#define XTLITE_VERSION_MAJOR 0 -#define XTLITE_VERSION_MINOR 1 -#define XTLITE_VERSION_PATCH 0 +#define XTC_VERSION_MAJOR 0 +#define XTC_VERSION_MINOR 1 +#define XTC_VERSION_PATCH 0 typedef struct xt_app xt_app; diff --git a/include/xtlite/xtlite_engine.h b/include/xtc/xtc_engine.h similarity index 93% rename from include/xtlite/xtlite_engine.h rename to include/xtc/xtc_engine.h index 4d0c91e..e5023a5 100644 --- a/include/xtlite/xtlite_engine.h +++ b/include/xtc/xtc_engine.h @@ -1,7 +1,7 @@ -#ifndef XTLITE_ENGINE_H -#define XTLITE_ENGINE_H +#ifndef XTC_ENGINE_H +#define XTC_ENGINE_H -#include "xtlite_types.h" +#include "xtc_types.h" #ifdef __cplusplus extern "C" { diff --git a/include/xtlite/xtlite_project.h b/include/xtc/xtc_project.h similarity index 84% rename from include/xtlite/xtlite_project.h rename to include/xtc/xtc_project.h index ac321d8..c7d371b 100644 --- a/include/xtlite/xtlite_project.h +++ b/include/xtc/xtc_project.h @@ -1,7 +1,7 @@ -#ifndef XTLITE_PROJECT_H -#define XTLITE_PROJECT_H +#ifndef XTC_PROJECT_H +#define XTC_PROJECT_H -#include "xtlite_types.h" +#include "xtc_types.h" #ifdef __cplusplus extern "C" { diff --git a/include/xtlite/xtlite_types.h b/include/xtc/xtc_types.h similarity index 89% rename from include/xtlite/xtlite_types.h rename to include/xtc/xtc_types.h index 663636a..42298eb 100644 --- a/include/xtlite/xtlite_types.h +++ b/include/xtc/xtc_types.h @@ -1,5 +1,5 @@ -#ifndef XTLITE_TYPES_H -#define XTLITE_TYPES_H +#ifndef XTC_TYPES_H +#define XTC_TYPES_H #include #include diff --git a/include/xtc/xtc_version.h b/include/xtc/xtc_version.h new file mode 100644 index 0000000..dd3aa6a --- /dev/null +++ b/include/xtc/xtc_version.h @@ -0,0 +1,7 @@ +#ifndef XTC_VERSION_H +#define XTC_VERSION_H + +#define XTC_VERSION_STRING "0.1.0" +#define XTC_PROJECT_NAME "xtc" + +#endif diff --git a/include/xtlite/xtlite_version.h b/include/xtlite/xtlite_version.h deleted file mode 100644 index 3efac0e..0000000 --- a/include/xtlite/xtlite_version.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef XTLITE_VERSION_H -#define XTLITE_VERSION_H - -#define XTLITE_VERSION_STRING "0.1.0" -#define XTLITE_PROJECT_NAME "xtlite" - -#endif diff --git a/src/core/xtlite.c b/src/core/xtc.c similarity index 97% rename from src/core/xtlite.c rename to src/core/xtc.c index 9d1e0c6..93a3d51 100644 --- a/src/core/xtlite.c +++ b/src/core/xtc.c @@ -1,4 +1,4 @@ -#include "xtlite/xtlite.h" +#include "xtc/xtc.h" #include diff --git a/src/graph/graph.c b/src/graph/graph.c index 41e76f4..4ac8fea 100644 --- a/src/graph/graph.c +++ b/src/graph/graph.c @@ -1,4 +1,4 @@ -#include "xtlite/xtlite_engine.h" +#include "xtc/xtc_engine.h" #include #include diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp index ceccb1d..34ab5c9 100644 --- a/src/gui/main_window.cpp +++ b/src/gui/main_window.cpp @@ -6,11 +6,11 @@ #include extern "C" { -#include "xtlite/xtlite.h" +#include "xtc/xtc.h" } MainWindow::MainWindow() - : Fl_Double_Window(1000, 680, "xtlite — modular audio workstation") + : Fl_Double_Window(1000, 680, "xtc — modular audio workstation") { begin(); diff --git a/src/gui/main_window.hpp b/src/gui/main_window.hpp index 2b8df2e..ad107e9 100644 --- a/src/gui/main_window.hpp +++ b/src/gui/main_window.hpp @@ -1,5 +1,5 @@ -#ifndef XTLITE_MAIN_WINDOW_HPP -#define XTLITE_MAIN_WINDOW_HPP +#ifndef XTC_MAIN_WINDOW_HPP +#define XTC_MAIN_WINDOW_HPP #include diff --git a/src/main.c b/src/main.c index bd4da45..f3b3a1a 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ -#include "xtlite/xtlite.h" -#include "xtlite/xtlite_version.h" +#include "xtc/xtc.h" +#include "xtc/xtc_version.h" #include #include @@ -17,7 +17,7 @@ int main(void) xt_app_destroy(app); if (printf("%s %s: core startup/shutdown OK\n", - XTLITE_PROJECT_NAME, XTLITE_VERSION_STRING) < 0) { + XTC_PROJECT_NAME, XTC_VERSION_STRING) < 0) { return EXIT_FAILURE; } return EXIT_SUCCESS; diff --git a/tests/unit/test_core.c b/tests/unit/test_core.c index 0d97e48..cad4b67 100644 --- a/tests/unit/test_core.c +++ b/tests/unit/test_core.c @@ -1,5 +1,5 @@ -#include "xtlite/xtlite.h" -#include "xtlite/xtlite_engine.h" +#include "xtc/xtc.h" +#include "xtc/xtc_engine.h" #include #include @@ -38,6 +38,6 @@ int main(void) CHECK(xt_graph_validate(graph) == XT_ERR_GRAPH_CYCLE); xt_graph_destroy(graph); - (void)puts("All xtlite core tests passed."); + (void)puts("All xtc core tests passed."); return 0; }