Repository navigation
Add level meters and improve timer responsiveness #24
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
699138a
c23a710
f47561d
587c39f
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,10 @@ | |||||
| AirPlayPluginEditor::AirPlayPluginEditor(AirPlayPluginProcessor& p) | ||||||
| : AudioProcessorEditor(&p), audioProcessor(p) | ||||||
| { | ||||||
| setSize(500, 500); | ||||||
| // Set a reasonable size that works for both standalone and plugin contexts | ||||||
| setSize(600, 500); | ||||||
| setResizable(true, true); | ||||||
| setResizeLimits(400, 400, 800, 600); | ||||||
|
|
||||||
| titleLabel.setText("FreeCaster", juce::dontSendNotification); | ||||||
| titleLabel.setFont(juce::Font(24.0f, juce::Font::bold)); | ||||||
|
|
@@ -56,6 +59,13 @@ AirPlayPluginEditor::AirPlayPluginEditor(AirPlayPluginProcessor& p) | |||||
| outputMeterLabel.setFont(juce::Font(11.0f)); | ||||||
| addAndMakeVisible(outputMeterLabel); | ||||||
|
|
||||||
| // Test audio button | ||||||
| testAudioButton.setButtonText("Test Meters"); | ||||||
| testAudioButton.onClick = [this] { | ||||||
| testLevel = (testLevel > 0.0f) ? 0.0f : 0.75f; | ||||||
| }; | ||||||
| addAndMakeVisible(testAudioButton); | ||||||
|
|
||||||
| // Set up error callbacks | ||||||
| audioProcessor.getAirPlayManager().onError = [this](const juce::String& error) | ||||||
| { | ||||||
|
|
@@ -107,9 +117,11 @@ void AirPlayPluginEditor::resized() | |||||
| area.removeFromTop(10); | ||||||
|
|
||||||
| auto buttonArea = area.removeFromTop(40); | ||||||
| connectButton.setBounds(buttonArea.removeFromLeft(165)); | ||||||
| buttonArea.removeFromLeft(10); | ||||||
| disconnectButton.setBounds(buttonArea); | ||||||
| connectButton.setBounds(buttonArea.removeFromLeft(110)); | ||||||
| buttonArea.removeFromLeft(5); | ||||||
| disconnectButton.setBounds(buttonArea.removeFromLeft(110)); | ||||||
| buttonArea.removeFromLeft(5); | ||||||
| testAudioButton.setBounds(buttonArea); | ||||||
|
|
||||||
| // Layout meters vertically on the right side | ||||||
| metersArea.removeFromTop(40); // Align with title | ||||||
|
|
@@ -119,10 +131,10 @@ void AirPlayPluginEditor::resized() | |||||
| auto outputMeterArea = metersArea.removeFromLeft(40); | ||||||
|
|
||||||
| inputMeterLabel.setBounds(inputMeterArea.removeFromTop(20)); | ||||||
| inputMeter.setBounds(inputMeterArea.removeFromTop(340)); | ||||||
| inputMeter.setBounds(inputMeterArea); // Use remaining height | ||||||
|
|
||||||
| outputMeterLabel.setBounds(outputMeterArea.removeFromTop(20)); | ||||||
| outputMeter.setBounds(outputMeterArea.removeFromTop(340)); | ||||||
| outputMeter.setBounds(outputMeterArea); // Use remaining height | ||||||
|
||||||
| outputMeter.setBounds(outputMeterArea); // Use remaining height | |
| outputMeter.setBounds(outputMeterArea); // Use height remaining after label |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||
| #!/usr/bin/env python3 | ||||||
| """ | ||||||
| Simple test script to verify FreeCaster plugin loads correctly | ||||||
| """ | ||||||
| import subprocess | ||||||
| import sys | ||||||
| import os | ||||||
|
|
||||||
| def test_plugin(): | ||||||
| print("Testing FreeCaster Plugin...") | ||||||
|
|
||||||
| # Check if VST3 plugin exists | ||||||
| vst3_path = "/Users/edahl/Library/Audio/Plug-Ins/VST3/FreeCaster.vst3" | ||||||
|
||||||
| if os.path.exists(vst3_path): | ||||||
| print("✅ VST3 plugin found") | ||||||
| else: | ||||||
| print("❌ VST3 plugin not found") | ||||||
| return False | ||||||
|
|
||||||
| # Check if AU plugin exists | ||||||
| au_path = "/Users/edahl/Library/Audio/Plug-Ins/Components/FreeCaster.component" | ||||||
|
||||||
| au_path = "/Users/edahl/Library/Audio/Plug-Ins/Components/FreeCaster.component" | |
| au_path = os.path.expanduser("~/Library/Audio/Plug-Ins/Components/FreeCaster.component") |
Copilot
AI
Oct 24, 2025
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.
Hard-coded absolute path is user-specific and will fail for other developers. Consider using a relative path from the script location or environment variables to make this test portable.
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.
[nitpick] Comment states 'Use remaining height' but the previous line
inputMeterArea.removeFromTop(20)already consumed 20 pixels for the label, so this uses the height after label removal. Consider clarifying: 'Use height remaining after label'.