Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "deps/juce"]
path = deps/juce
url = https://github.com/juce-framework/JUCE.git
[submodule "deps/lvtk"]
path = deps/lvtk
url = https://github.com/lvtk/lvtk
[submodule "deps/clap-juce-extensions"]
path = deps/clap-juce-extensions
url = https://github.com/free-audio/clap-juce-extensions
1 change: 0 additions & 1 deletion deps/lvtk
Submodule lvtk deleted from 6e5f8d
111 changes: 0 additions & 111 deletions include/element/aligneddata.hpp

This file was deleted.

104 changes: 0 additions & 104 deletions include/element/atombuffer.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions include/element/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class Log;
class PluginManager;
class PresetManager;
class Settings;
class SymbolMap;

class Context {
public:
Expand All @@ -40,7 +39,6 @@ class Context {
SessionPtr session();

Settings& settings();
SymbolMap& symbols();

//=========================================================================
void openModule (const std::string& path);
Expand Down
25 changes: 2 additions & 23 deletions include/element/processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <element/juce/audio_basics.hpp>
#include <element/juce/audio_processors.hpp>

#include <element/atombuffer.hpp>
#include <element/atomic.hpp>
#include <element/midipipe.hpp>
#include <element/oversampler.hpp>
Expand All @@ -25,7 +24,6 @@ namespace GraphRender {
class ProcessBufferOp;
}

class AtomBuffer;
class Editor;
class GraphNode;
class ProcessBufferOp;
Expand All @@ -34,24 +32,8 @@ struct RenderContext {
juce::AudioSampleBuffer audio;
juce::AudioSampleBuffer cv;
MidiPipe midi;
AtomPipe atom;

// clang-format off
RenderContext (float* const *audioData,
int numAudio,
float* const *cvData,
int numCV,
const juce::OwnedArray<juce::MidiBuffer>& sharedMidi,
const juce::Array<int>& midiIndexes,
const juce::OwnedArray<AtomBuffer>& sharedAtom,
const juce::Array<int>& atomIndexes,
int numSamples)
: audio (audioData, numAudio, numSamples),
cv (cvData, numCV, numSamples),
midi (sharedMidi, midiIndexes),
atom (sharedAtom, atomIndexes)
{}

RenderContext (float* const *audioData,
int numAudio,
float* const *cvData,
Expand All @@ -67,14 +49,11 @@ struct RenderContext {
RenderContext (AudioSampleBuffer& audioRef,
AudioSampleBuffer& cvRef,
MidiBuffer& midiRef,
AtomBuffer& atomRef,
int numSamples)
: audio (audioRef.getArrayOfWritePointers(), audioRef.getNumChannels(), numSamples),
cv (cvRef.getArrayOfWritePointers(), cvRef.getNumChannels(), numSamples),
midi (midiRef),
atom (atomRef)
{
}
midi (midiRef)
{}
// clang-format on
};

Expand Down
42 changes: 42 additions & 0 deletions include/element/spinlock.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2026 Kushview, LLC
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once

#include <atomic>

#include <element/element.h>

namespace element {

/** A simple spin lock using std::atomic. */
class EL_API SpinLock {
public:
/** Initialize unlocked. */
inline SpinLock() = default;
inline ~SpinLock() = default;

/** Lock or yield until locked. (non realtime) */
void lock() const noexcept;
/** Lock immediately or return false. (realtime)*/
inline bool tryLock() const noexcept { return tryLock (0, 1); }
/** Unlock the mutex. Note this does not check lock status. */
inline void unlock() const noexcept { _lock = 0; }
/** Returns true if the mutex is locked. */
inline bool locked() const noexcept { return _lock.load() == 1; }

private:
mutable std::atomic<int> _lock { 0 };
/** @internal */
inline bool tryLock (int c, int v) const noexcept
{
return _lock.compare_exchange_strong (c, v);
}

SpinLock (const SpinLock&) = delete;
SpinLock& operator= (const SpinLock&) = delete;
SpinLock (SpinLock&&) = delete;
SpinLock& operator= (SpinLock&&) = delete;
};

} // namespace element
31 changes: 0 additions & 31 deletions include/element/symbolmap.hpp

This file was deleted.

1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ target_include_directories(element
"${PROJECT_SOURCE_DIR}/src/lua/src"
"${PROJECT_SOURCE_DIR}/deps/clap-juce-extensions/clap-libs/clap/include"
"${PROJECT_SOURCE_DIR}/deps/clap-juce-extensions/clap-libs/clap-helpers/include"
"${PROJECT_SOURCE_DIR}/deps/lvtk/include"
"${Boost_INCLUDE_DIRS}"
)

Expand Down
Loading
Loading