kopia lustrzana https://github.com/jameshball/osci-render
Fix issue with sample rate not being set correctly when recording audio
rodzic
8d475d7946
commit
986a1cfd13
|
@ -43,6 +43,17 @@ public:
|
||||||
activeWriter = threadedWriter.get();
|
activeWriter = threadedWriter.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Error: Invalid sample rate
|
||||||
|
juce::AlertWindow::showMessageBoxAsync(
|
||||||
|
juce::AlertWindow::WarningIcon,
|
||||||
|
"Recording Error",
|
||||||
|
"Cannot start recording: Invalid sample rate (" + juce::String(sampleRate) + "). Sample rate must be greater than 0.",
|
||||||
|
"OK"
|
||||||
|
);
|
||||||
|
stop();
|
||||||
|
stopCallback();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +102,7 @@ private:
|
||||||
juce::int64 nextSampleNum = 0;
|
juce::int64 nextSampleNum = 0;
|
||||||
|
|
||||||
double recordingLength = 99999999999.0;
|
double recordingLength = 99999999999.0;
|
||||||
double sampleRate = 192000;
|
double sampleRate = -1;
|
||||||
|
|
||||||
juce::CriticalSection writerLock;
|
juce::CriticalSection writerLock;
|
||||||
std::atomic<juce::AudioFormatWriter::ThreadedWriter*> activeWriter { nullptr };
|
std::atomic<juce::AudioFormatWriter::ThreadedWriter*> activeWriter { nullptr };
|
||||||
|
|
|
@ -26,6 +26,8 @@ VisualiserComponent::VisualiserComponent(
|
||||||
visualiserOnly(visualiserOnly),
|
visualiserOnly(visualiserOnly),
|
||||||
parent(parent),
|
parent(parent),
|
||||||
editor(pluginEditor) {
|
editor(pluginEditor) {
|
||||||
|
setShouldBeRunning(true);
|
||||||
|
|
||||||
#if OSCI_PREMIUM
|
#if OSCI_PREMIUM
|
||||||
addAndMakeVisible(editor.ffmpegDownloader);
|
addAndMakeVisible(editor.ffmpegDownloader);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -89,6 +89,7 @@ public:
|
||||||
VisualiserParameters() {
|
VisualiserParameters() {
|
||||||
#if OSCI_PREMIUM
|
#if OSCI_PREMIUM
|
||||||
scaleEffect->markLockable(true);
|
scaleEffect->markLockable(true);
|
||||||
|
booleans.push_back(scaleEffect->linked);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ VisualiserRenderer::VisualiserRenderer(
|
||||||
{
|
{
|
||||||
openGLContext.setRenderer(this);
|
openGLContext.setRenderer(this);
|
||||||
openGLContext.attachTo(*this);
|
openGLContext.attachTo(*this);
|
||||||
setShouldBeRunning(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VisualiserRenderer::~VisualiserRenderer() {
|
VisualiserRenderer::~VisualiserRenderer() {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginCharacteristicsValue="pluginWantsMidiIn"
|
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginCharacteristicsValue="pluginWantsMidiIn"
|
||||||
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
|
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
|
||||||
cppLanguageStandard="20" projectLineFeed=" " headerPath="./include"
|
cppLanguageStandard="20" projectLineFeed=" " headerPath="./include"
|
||||||
version="2.5.1.0" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
version="2.5.1.1" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
||||||
companyEmail="james@ball.sh" defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 OSCI_PREMIUM=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 JUCE_MODAL_LOOPS_PERMITTED=1"
|
companyEmail="james@ball.sh" defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 OSCI_PREMIUM=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 JUCE_MODAL_LOOPS_PERMITTED=1"
|
||||||
pluginAUMainType="'aumf'">
|
pluginAUMainType="'aumf'">
|
||||||
<MAINGROUP id="j5Ge2T" name="osci-render">
|
<MAINGROUP id="j5Ge2T" name="osci-render">
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<JUCERPROJECT id="HH2E72" name="sosci" projectType="audioplug" useAppConfig="0"
|
<JUCERPROJECT id="HH2E72" name="sosci" projectType="audioplug" useAppConfig="0"
|
||||||
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginManufacturer="jameshball"
|
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginManufacturer="jameshball"
|
||||||
aaxIdentifier="sh.ball.sosci" cppLanguageStandard="20" projectLineFeed=" "
|
aaxIdentifier="sh.ball.sosci" cppLanguageStandard="20" projectLineFeed=" "
|
||||||
headerPath="./include" version="1.1.7.0" companyName="James H Ball"
|
headerPath="./include" version="1.1.7.1" companyName="James H Ball"
|
||||||
companyWebsite="https://osci-render.com" companyEmail="james@ball.sh"
|
companyWebsite="https://osci-render.com" companyEmail="james@ball.sh"
|
||||||
defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 OSCI_PREMIUM=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 JUCE_MODAL_LOOPS_PERMITTED=1"
|
defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 OSCI_PREMIUM=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 JUCE_MODAL_LOOPS_PERMITTED=1"
|
||||||
pluginManufacturerCode="Jhba" pluginCode="Sosc" pluginAUMainType="'aufx'">
|
pluginManufacturerCode="Jhba" pluginCode="Sosc" pluginAUMainType="'aufx'">
|
||||||
|
|
Ładowanie…
Reference in New Issue