Commit Graph

12 Commits

Author SHA1 Message Date
Loic Coenen
755af275d8 fix: convert shared scene metadata to atomic_int to fix data races
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-10 19:33:12 +00:00
Loic Coenen
1ba98fc768 fix: prevent hang in scene add/remove test and fix unsafe scene copy
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-10 18:34:26 +00:00
Loic Coenen
7b00246443 feat: implement scene infrastructure for multi-scene looper support
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-10 18:00:32 +00:00
Loic Coenen
44177f785f style: fix code formatting in channel.c and midi.c 2026-05-10 18:00:29 +00:00
Loic Coenen
ff226a8ea6 feat: add per-channel MIDI looping support
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-10 11:29:41 +00:00
Loic Coenen
5739ff8019 feat: remove hard limit on number of channels
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-10 10:38:59 +00:00
Loic Coenen
aa0b191b46 makefile
```makefile
<<<<<<< SEARCH
check:
	cppcheck --enable=all --error-exitcode=1 --suppress=missingIncludeSystem --suppress=usleepCalled --suppress=unreadVariable --suppress=normalCheckLevelMaxBranches src/*.c --library=posix .
=======
check:
	cppcheck --enable=all --error-exitcode=1 --suppress=unreadVariable src/*.c --library=posix .
>>>>>>> REPLACE
```

src/channel.c
```c
<<<<<<< SEARCH
#include "channel.h"
#include <jack/jack.h>
#include <stdatomic.h>
#include <stdio.h>
#include <string.h>
=======
// cppcheck-suppress missingIncludeSystem
#include "channel.h"
#include <jack/jack.h>
#include <stdatomic.h>
#include <stdio.h>
#include <string.h>
>>>>>>> REPLACE
```

src/channel.h
```c
<<<<<<< SEARCH
#include <jack/jack.h>
#include <stdatomic.h>
=======
// cppcheck-suppress missingIncludeSystem
#include <jack/jack.h>
#include <stdatomic.h>
>>>>>>> REPLACE
```

src/looper.c
```c
<<<<<<< SEARCH
#include "looper.h"
#include "channel.h"
#include "midi.h"
#include <jack/jack.h>
#include <jack/midiport.h>
#include <math.h>
#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
=======
// cppcheck-suppress missingIncludeSystem
#include "looper.h"
#include "channel.h"
#include "midi.h"
#include <jack/jack.h>
#include <jack/midiport.h>
#include <math.h>
#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
>>>>>>> REPLACE
```

src/looper.h
```c
<<<<<<< SEARCH
#include <jack/jack.h>
=======
// cppcheck-suppress missingIncludeSystem
#include <jack/jack.h>
>>>>>>> REPLACE
```

src/main.c
```c
<<<<<<< SEARCH
#include "looper.h"
#include <jack/jack.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
=======
// cppcheck-suppress missingIncludeSystem
#include "looper.h"
#include <jack/jack.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
>>>>>>> REPLACE
```

src/midi.c
```c
<<<<<<< SEARCH
#include "midi.h"
#include "channel.h"
#include <jack/jack.h>
#include <jack/midiport.h>
#include <stdatomic.h>
=======
// cppcheck-suppress missingIncludeSystem
#include "midi.h"
#include "channel.h"
#include <jack/jack.h>
#include <jack/midiport.h>
#include <stdatomic.h>
>>>>>>> REPLACE
```

src/midi.h
```c
<<<<<<< SEARCH
#include <jack/types.h>
=======
// cppcheck-suppress missingIncludeSystem
#include <jack/types.h>
>>>>>>> REPLACE
```

tests/integration.c
```c
<<<<<<< SEARCH
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <string.h>
#include <stdarg.h>
#include <fcntl.h>
#include <jack/jack.h>
#include <jack/midiport.h>
#include <math.h>
#include <time.h>
=======
// cppcheck-suppress missingIncludeSystem
// cppcheck-suppress usleepCalled
// cppcheck-suppress normalCheckLevelMaxBranches
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <string.h>
#include <stdarg.h>
#include <fcntl.h>
#include <jack/jack.h>
#include <jack/midiport.h>
#include <math.h>
#include <time.h>
>>>>>>> REPLACE
```

Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-09 12:46:50 +00:00
Loic Coenen
c2df024350 style: reformat code and update cppcheck suppressions 2026-05-09 12:46:31 +00:00
Loic Coenen
b0dda3d8ed fix: defer port unregistration to avoid race condition in channel removal
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-09 10:00:33 +00:00
Loic Coenen
c0a0a6e968 fix: add null-checks for MIDI ports and use atomic access for channel active flag
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-09 09:57:36 +00:00
Loic Coenen
b73719e8bc fix: guard against NULL audio ports and defer channel activation until port registration succeeds
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-08 21:08:37 +00:00
Loic Coenen
96295fdb4c refactor: split monolithic main.c into modular source files
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-08 21:03:10 +00:00