kopia lustrzana https://github.com/jameshball/osci-render
Adjust timeout to 3 seconds
commit
00a50f10ca
|
@ -147,6 +147,10 @@ void VisualiserComponent::setFullScreen(bool fullScreen) {
|
|||
this->fullScreen = fullScreen;
|
||||
hideButtonRow = false;
|
||||
setMouseCursor(juce::MouseCursor::PointingHandCursor);
|
||||
|
||||
// Release renderingSemaphore to prevent deadlocks during layout changes
|
||||
renderingSemaphore.release();
|
||||
|
||||
resized();
|
||||
}
|
||||
|
||||
|
@ -281,7 +285,10 @@ void VisualiserComponent::runTask(const std::vector<osci::Point>& points) {
|
|||
// this just triggers a repaint
|
||||
triggerAsyncUpdate();
|
||||
// wait for rendering on the OpenGLRenderer thread to complete
|
||||
renderingSemaphore.acquire();
|
||||
if (!renderingSemaphore.acquire()) {
|
||||
// If acquire times out, log a message or handle it as appropriate
|
||||
juce::Logger::writeToLog("Rendering semaphore acquisition timed out");
|
||||
}
|
||||
}
|
||||
|
||||
int VisualiserComponent::prepareTask(double sampleRate, int bufferSize) {
|
||||
|
@ -388,6 +395,9 @@ void VisualiserComponent::setRecording(bool recording) {
|
|||
bool stillRecording = audioRecorder.isRecording();
|
||||
#endif
|
||||
|
||||
// Release renderingSemaphore to prevent deadlock
|
||||
renderingSemaphore.release();
|
||||
|
||||
if (recording) {
|
||||
#if OSCI_PREMIUM
|
||||
recordingVideo = recordingSettings.recordingVideo();
|
||||
|
@ -601,6 +611,10 @@ void VisualiserComponent::popoutWindow() {
|
|||
}
|
||||
#endif
|
||||
setRecording(false);
|
||||
|
||||
// Release renderingSemaphore to prevent deadlock when creating a child visualizer
|
||||
renderingSemaphore.release();
|
||||
|
||||
auto visualiser = new VisualiserComponent(
|
||||
audioProcessor,
|
||||
editor,
|
||||
|
@ -950,6 +964,9 @@ Texture VisualiserComponent::makeTexture(int width, int height, GLuint textureID
|
|||
void VisualiserComponent::setResolution(int width) {
|
||||
using namespace juce::gl;
|
||||
|
||||
// Release semaphore to prevent deadlocks during texture rebuilding
|
||||
renderingSemaphore.release();
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer);
|
||||
|
||||
lineTexture = makeTexture(width, width, lineTexture.id);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d089b78b1e1e16d6b6173cba6f4202a87e05b0ba
|
||||
Subproject commit cf124cc5de4d9857c7633e9c03117f20e1550e81
|
Ładowanie…
Reference in New Issue