-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add macOS platform support #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,8 @@ struct ClipEdits { | |
| double sourceStart = 0.0; | ||
| }; | ||
|
|
||
| using LocalEdits = ClipEdits; | ||
|
|
||
|
Comment on lines
+63
to
+64
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider adding a comment explaining If 🤖 Prompt for AI Agents |
||
| /** | ||
| * @brief Represents a single clip instance on the playlist | ||
| */ | ||
|
|
@@ -71,6 +73,7 @@ struct ClipInstance { | |
| double startBeat = 0.0; | ||
| double durationBeats = 4.0; | ||
| double sourceOffset = 0.0; // Offset into source material | ||
| bool muted = false; | ||
|
|
||
| ClipEdits edits; | ||
|
Comment on lines
+76
to
78
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check how both muted fields are used to understand intended semantics
rg -n '\.muted\b' --type=cpp -C 2 | head -80
# Check for any logic combining the two muted states
rg -n 'edits\.muted|instance.*muted' --type=cpp -C 3Repository: currentsuspect/Aestra Length of output: 5985 🏁 Script executed: #!/bin/bash
# Check the ClipInstance.h header structure
cat -n AestraAudio/include/Models/ClipInstance.h | grep -A 10 -B 10 "muted\|ClipEdits"Repository: currentsuspect/Aestra Length of output: 1757 🏁 Script executed: #!/bin/bash
# More thorough search for any usage of muted as a member of ClipInstance (not edits)
# Search patterns: obj.muted, instance.muted, clip.muted (not clip.edits.muted)
rg -n '\bmuted\b' --type=cpp -A 2 -B 2 | grep -v 'edits\.muted\|channel->muted\|info\.muted\|existing->muted' | head -100Repository: currentsuspect/Aestra Length of output: 6943 🏁 Script executed: #!/bin/bash
# Search for any direct assignment or read of ClipInstance muted field
# Look for patterns like: instance.muted, clip.muted (not clip.edits.muted), ->muted (for pointers)
rg -n 'clip\s*\.\s*muted(?!\s*\.)|instance\s*\.\s*muted|->muted' --type=cpp | grep -v 'edits\|channel\|lane\|mixer\|info\|existing'Repository: currentsuspect/Aestra Length of output: 341 🏁 Script executed: #!/bin/bash
# Search for ClipInstance constructor usage or initialization
ast-grep --pattern 'ClipInstance $$ = $$$' | head -50Repository: currentsuspect/Aestra Length of output: 47 🏁 Script executed: #!/bin/bash
# Simple search for clip.muted or instance.muted patterns
rg -n '\bclip\b.*\bmuted\b' --type=cpp | head -50Repository: currentsuspect/Aestra Length of output: 424 🏁 Script executed: #!/bin/bash
# Alternative: search for assignment to muted field on ClipInstance context
rg -n '\bmuted\s*=' --type=cpp -B 3 | grep -A 3 -B 3 'ClipInstance\|clip\.' | head -80Repository: currentsuspect/Aestra Length of output: 1788 Remove unused instance-level The instance-level Remove the unused field to eliminate confusion and keep the codebase clean. 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ class PatternManager { | |
| /** | ||
| * @brief Create a MIDI pattern | ||
| */ | ||
| PatternID createMidiPattern(const std::string& name, double lengthBeats, const MidiPayload& payload) { | ||
| PatternID createMidiPattern(const std::string& name, double lengthBeats, const MidiPayload& payload = MidiPayload{}) { | ||
| PatternID id{nextId++}; | ||
| auto pattern = std::make_unique<PatternSource>(); | ||
| pattern->id = id; | ||
|
|
@@ -74,26 +74,6 @@ class PatternManager { | |
| return id; | ||
| } | ||
|
|
||
| /** | ||
| * @brief Clone an existing pattern and return the new ID | ||
| */ | ||
| PatternID clonePattern(PatternID sourceId) { | ||
| auto* src = getPattern(sourceId); | ||
| if (!src) return PatternID{}; | ||
| PatternID id{nextId++}; | ||
| auto pattern = std::make_unique<PatternSource>(*src); | ||
| pattern->id = id; | ||
| m_patterns[id.value] = std::move(pattern); | ||
| return id; | ||
| } | ||
|
|
||
| /** | ||
| * @brief Remove a pattern by ID | ||
| */ | ||
| void removePattern(PatternID id) { | ||
| m_patterns.erase(id.value); | ||
| } | ||
|
|
||
| /** | ||
| * @brief Get or create a pattern | ||
| */ | ||
|
|
@@ -126,10 +106,35 @@ class PatternManager { | |
| fn(*pattern); | ||
| } | ||
|
|
||
| /** | ||
| * @brief Clone an existing pattern | ||
| */ | ||
| PatternID clonePattern(PatternID sourceId) { | ||
| auto* source = getPattern(sourceId); | ||
| if (!source) return PatternID{}; | ||
|
|
||
| PatternID newId{nextId++}; | ||
| auto pattern = std::make_unique<PatternSource>(); | ||
| pattern->id = newId; | ||
| pattern->name = source->name + " (Copy)"; | ||
| pattern->lengthBeats = source->lengthBeats; | ||
| pattern->type = source->type; | ||
| pattern->payload = source->payload; | ||
| m_patterns[newId.value] = std::move(pattern); | ||
|
Comment on lines
+112
to
+123
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
file="$(fd '^PatternSource\.h$' | head -n1)"
if [[ -z "${file}" ]]; then
echo "PatternSource.h not found" >&2
exit 1
fi
echo "Inspecting ${file}"
sed -n '1,240p' "${file}"Repository: currentsuspect/Aestra Length of output: 2782 Clone silently drops the mixer channel assignment. The 🤖 Prompt for AI Agents |
||
| return newId; | ||
| } | ||
|
|
||
| /** | ||
| * @brief Remove a pattern | ||
| */ | ||
| void removePattern(PatternID id) { | ||
| m_patterns.erase(id.value); | ||
| } | ||
|
Comment on lines
+130
to
+132
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -name "PatternManager.h" -type fRepository: currentsuspect/Aestra Length of output: 110 🏁 Script executed: cat -n "AestraAudio/include/Models/PatternManager.h"Repository: currentsuspect/Aestra Length of output: 5040 🏁 Script executed: rg "getAllPatterns" --type cpp --type h -B 2 -A 5Repository: currentsuspect/Aestra Length of output: 4009 🏁 Script executed: rg "removePattern" --type cpp --type h -B 2 -A 5Repository: currentsuspect/Aestra Length of output: 1102
The code comment at line 96 acknowledges this is "not ideal but works for shim," indicating the developers were aware of the design flaw. Resolve by either:
🤖 Prompt for AI Agents |
||
|
|
||
| private: | ||
| uint64_t nextId{1}; | ||
| std::unordered_map<uint64_t, std::unique_ptr<PatternSource>> m_patterns; | ||
| }; | ||
|
|
||
| } // namespace Audio | ||
| } // namespace Aestra | ||
| } // namespace Aestra | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,20 +3,22 @@ | |
|
|
||
| namespace Aestra { | ||
| namespace Audio { | ||
|
|
||
| class PlaylistMixer { | ||
| public: | ||
| static void setResamplingQuality(ClipResamplingQuality quality) { | ||
| s_resamplingQuality = quality; | ||
| } | ||
|
|
||
| static void setResamplingQuality(int quality) { | ||
| setResamplingQuality(static_cast<ClipResamplingQuality>(quality)); | ||
| } | ||
|
Comment on lines
+12
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check ClipResamplingQuality enum definition to determine valid range
ast-grep --pattern $'enum class ClipResamplingQuality {
$$$
}'
# Fallback: search for enum definition
rg -n 'enum.*ClipResamplingQuality' -A 10Repository: currentsuspect/Aestra Length of output: 18416 🏁 Script executed: # Find all calls to setResamplingQuality with int argument
rg -n 'setResamplingQuality\s*\(\s*\d+\s*\)|setResamplingQuality\s*\(\s*\w+\s*\)' -A 2 -B 2
# Also search for the implementation in PlaylistMixer
rg -n 'setResamplingQuality' -A 3 -B 1 AestraAudio/include/Models/PlaylistMixer.h
# Check if there's a definition in PlaylistMixer.h
cat -n AestraAudio/include/Models/PlaylistMixer.h | head -50Repository: currentsuspect/Aestra Length of output: 1191 🏁 Script executed: # Search for calls to setResamplingQuality(int) - look for numeric literals or int variables
rg -n 'setResamplingQuality\(' --type cpp --type h | grep -E '\(.*\)' | head -30
# More specific: search for setResamplingQuality calls with int or numeric values
rg -n 'PlaylistMixer.*setResamplingQuality|\.setResamplingQuality' -B 2 -A 2
# Check AudioSettingsPage.cpp mentioned in original review
fd 'AudioSettingsPage' -type f | head -5Repository: currentsuspect/Aestra Length of output: 2198 🏁 Script executed: # Examine AudioSettingsPage.cpp around the call to setResamplingQuality
sed -n '370,400p' Source/Settings/AudioSettingsPage.cppRepository: currentsuspect/Aestra Length of output: 1288 🏁 Script executed: # Check what determines qIdx and its range
sed -n '360,390p' Source/Settings/AudioSettingsPage.cppRepository: currentsuspect/Aestra Length of output: 1219 Int overload lacks validation — consider removing or adding bounds checks. The Consider either:
🤖 Prompt for AI Agents |
||
|
|
||
| static ClipResamplingQuality getResamplingQuality() { | ||
| return s_resamplingQuality; | ||
| } | ||
|
|
||
| private: | ||
| static inline ClipResamplingQuality s_resamplingQuality = ClipResamplingQuality::Standard; | ||
| }; | ||
|
|
||
| } // namespace Audio | ||
| } // namespace Aestra | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. No macos driver registry
🐞 Bug✓ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools