Or, alternatively, just reconfigure it unconditionally?

Not sure how slower it will become ... but it seems to prevent crash
without adding any arbitrary constant
I wonder if it works with very fast shuttle forward?


On Wed, Apr 26, 2023 at 2:17 PM Andrew Randrianasulu
<[email protected]> wrote:
>
> I tried to set allocation to 2x more (because plugin suddently get 2x
> bigger buffer on speed change), but not sure if  this even sounds
> right?
>
> May be better idea is to store this PluginClient::in_buffer_size in
> plugin-local variable, and compare it to current value, and
> reconfigure if needed ...
>
> On Wed, Apr 26, 2023 at 9:26 AM Andrew Randrianasulu
> <[email protected]> wrote:
> >
> > Phyllis, can you check HV's version of delayaudio plugin functions?
> >
> > https://github.com/heroineworshiper/hvirtual/blob/457c27f1786a83d43ad205478e4389f760c4fdf9/plugins/delayaudio/delayaudio.C
> >
> > they slightly different, esp. in memcpy parts.
> > I'll try to test this idea myself, sometime this day.
> >
> >
> > пт, 21 апр. 2023 г., 19:03 Andrew Randrianasulu <[email protected]>:
> >>
> >> so far I get this Backtrace:
> >>
> >> Thread 88 "cin" received signal SIGSEGV, Segmentation fault.
> >> [Switching to Thread 0xc4612b00 (LWP 16879)]
> >> 0xf4e0f37d in DelayAudio::process_realtime(long long, Samples*,
> >> Samples*) () from /usr/lib/cin/plugins/audio/delayaudio.plugin
> >> (gdb) bt full
> >> #0  0xf4e0f37d in DelayAudio::process_realtime(long long, Samples*, 
> >> Samples*)
> >>     () from /usr/lib/cin/plugins/audio/delayaudio.plugin
> >> No symbol table info available.
> >> #1  0x08709468 in PluginAClient::process_buffer(long long, Samples*,
> >> long long, int) ()
> >> No symbol table info available.
> >> #2  0x08729ea5 in PluginServer::process_buffer(Samples**, long long,
> >> long long, long long, long long, int) ()
> >> No symbol table info available.
> >> #3  0x084d393b in AAttachmentPoint::render(Samples*, int, long long,
> >> long long, long long) ()
> >> No symbol table info available.
> >> #4  0x087efb03 in VirtualANode::render_as_module(Samples**, Samples*,
> >> long long, long long, long long) ()
> >> No symbol table info available.
> >> #5  0x087efbaa in VirtualANode::render(Samples*, long long, long long,
> >> long long) ()
> >> No symbol table info available.
> >> #6  0x087ede33 in VirtualAConsole::process_buffer(long long, long long) ()
> >> No symbol table info available.
> >> #7  0x08504f84 in ARender::run() ()
> >> No symbol table info available.
> >> #8  0x088f4881 in Thread::entrypoint(void*) ()
> >> --Type <RET> for more, q to quit, c to continue without paging--
> >> No symbol table info available.
> >> #9  0xf7e42328 in start_thread () from /lib/libpthread.so.0
> >> No symbol table info available.
> >> #10 0xf6204f06 in clone () from /lib/libc.so.6
> >> No symbol table info available.
> >>
> >> On Fri, Apr 21, 2023 at 5:08 AM Andrew Randrianasulu
> >> <[email protected]> wrote:
> >> >
> >> > Thanks a lot, I am sorry I spend most of time watching all 7 episodes of 
> >> > Extrapolations (tv series)  instead of doing anything at computer.
> >> >
> >> > So, it basically in "delay audio" plugin, this find narrows it quite a 
> >> > lot!
> >> >
> >> > пт, 21 апр. 2023 г., 04:04 Phyllis Smith <[email protected]>:
> >> >>
> >> >> Simplest demo to create "Delay Audio" plugin problem. I tested this 
> >> >> with 4 random audio files or video files that included audio files and 
> >> >> all crashed under this set of steps. So you can demo with any file but 
> >> >> 1 small example audio file is attached.
> >> >>
> >> >> 1) load/replace file (or load to resources and then drag onto timeline)
> >> >> 2) drag the "Delay Audio" plugin to the audio track
> >> >> 3) start playing file from the beginning (or start anywhere)
> >> >> 4) without stopping first, use the "fast forward" icon in the main 
> >> >> window to speed up the playing - CRASH
> >> >>
> >> >> ALTERNATIVE to "Delay Audio" is "F_adelay" which did not crash for me - 
> >> >> set "delays" parameter to desired seconds and use "Apply".
> >> >> Next I will use the debugger to learn some more.
diff --git a/cinelerra-5.1/plugins/delayaudio/delayaudio.C b/cinelerra-5.1/plugins/delayaudio/delayaudio.C
index 22c32f62..f45f253a 100644
--- a/cinelerra-5.1/plugins/delayaudio/delayaudio.C
+++ b/cinelerra-5.1/plugins/delayaudio/delayaudio.C
@@ -154,7 +154,8 @@ int DelayAudio::process_realtime(int64_t size, Samples *input_ptr, Samples *outp
 {
 
 	load_configuration();
-	if(need_reconfigure) reconfigure();
+	//if(need_reconfigure) 
+	reconfigure();
 
 // printf("DelayAudio::process_realtime %d %d\n",
 // input_start, size);
@@ -164,6 +165,9 @@ int DelayAudio::process_realtime(int64_t size, Samples *input_ptr, Samples *outp
 	double *buffer_samples = buffer->get_data();
 	double *output_samples = output_ptr->get_data();
 	double *input_samples = input_ptr->get_data();
+
+//printf("delay::audio IN buf size %i \n", PluginClient::in_buffer_size);
+
 	memcpy(buffer_samples + input_start, input_samples, size * sizeof(double));
 	memcpy(output_samples, buffer_samples, size * sizeof(double));
 
@@ -172,6 +176,7 @@ int DelayAudio::process_realtime(int64_t size, Samples *input_ptr, Samples *outp
 		buffer_samples[j] = buffer_samples[i];
 	}
 
+
 	return 0;
 }
 
-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to