Compare commits
3 Commits
b9b80c0ecb
...
f28c0965ec
Author | SHA1 | Date |
---|---|---|
Sebastien Bourdeauducq | f28c0965ec | |
Sebastien Bourdeauducq | b184b71169 | |
Sebastien Bourdeauducq | 89cb0383e5 |
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui
|
|||
SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
|
||||
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
|
||||
|
||||
CXXFLAGS = -std=c++14 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
|
||||
CXXFLAGS = -std=c++14 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I$(POCKETFFT_DIR)
|
||||
CXXFLAGS += -g -Wall -Wformat -O2
|
||||
LIBS = -L$(TINYALSA_DIR)/lib
|
||||
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -7,6 +7,11 @@
|
|||
let
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
imgui_dir = "${pkgs.imgui}/include/imgui";
|
||||
pocketfft = pkgs.fetchgit {
|
||||
url = "https://gitlab.mpcdf.mpg.de/mtr/pocketfft.git";
|
||||
rev = "ecd78caa1c862e18fb1a55bcd4e30a05430b01f6";
|
||||
hash = "sha256-xl7Tr1A1cqXhAL1Bljfk68R3AB1xOgkH15LHKxjYoSc=";
|
||||
};
|
||||
in rec {
|
||||
packages.x86_64-linux.microsa = pkgs.stdenv.mkDerivation {
|
||||
name = "microsa";
|
||||
|
@ -15,6 +20,7 @@
|
|||
propagatedBuildInputs = [ pkgs.wayland pkgs.glfw-wayland pkgs.libffi pkgs.alsa-lib ];
|
||||
preBuild = ''
|
||||
export IMGUI_DIR=${imgui_dir}
|
||||
export POCKETFFT_DIR=${pocketfft}
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
@ -23,11 +29,7 @@
|
|||
};
|
||||
devShell.x86_64-linux = pkgs.mkShell {
|
||||
name = "microsa-dev-shell";
|
||||
buildInputs = [
|
||||
pkgs.gnumake
|
||||
pkgs.gcc
|
||||
] ++ packages.x86_64-linux.microsa.nativeBuildInputs
|
||||
++ packages.x86_64-linux.microsa.propagatedBuildInputs;
|
||||
buildInputs = packages.x86_64-linux.microsa.nativeBuildInputs ++ packages.x86_64-linux.microsa.propagatedBuildInputs;
|
||||
shellHook = packages.x86_64-linux.microsa.preBuild;
|
||||
};
|
||||
defaultPackage.x86_64-linux = packages.x86_64-linux.microsa;
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -14,6 +14,9 @@
|
|||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include <pocketfft_hdronly.h>
|
||||
|
||||
|
||||
static std::atomic<bool> terminate_dsp;
|
||||
|
||||
static snd_pcm_t* pcm;
|
||||
|
@ -186,7 +189,6 @@ int main(int argc, char* argv[])
|
|||
ImGui::End();
|
||||
ImGui::PopStyleVar(1);
|
||||
|
||||
// Rendering
|
||||
ImGui::Render();
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
int display_w, display_h;
|
||||
|
|
Loading…
Reference in New Issue