Opened 15 years ago

Closed 9 years ago

#5106 closed bug (fixed)

ToneProducer Parameters Change with Delay

Reported by: bonefish Owned by: marcusoverhagen
Priority: normal Milestone: R1
Component: Kits/Media Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev34615, gcc 4

The ToneProducer app from the BeOS sample code has controls for three parameters (frequency, amplitude, wave form). Adjusting those controls takes effect with a significant delay (several seconds) on my machine. Since the application uses a parameter web and the parameter changes go through BControllable:{Get,Set}ParameterValue(), I would guess there's some incorrect handling of system vs. performance time. Assuming that the sample code worked correctly under BeOS, that would suggest a bug in Haiku.

For building with gcc 4 the inclusion of <stdlib.h> and <string.h> have to be added to NodeHarnessWin.cpp and stdc++ to the LIBS variable in the makefile.

Change History (4)

comment:1 by aldeck, 15 years ago

I confirm i noticed this problem with the flanger media add-on (included in the image).

comment:2 by 3dEyes, 12 years ago

I think the problem is related to the processing of messages in the queue of the BMediaEventLooper class. When called SetParameterValue(), it creates a message (media_timed_event) with parameters, which is placed in a queue (EventQueue()->AddEvent(ev)). Theoretically, this message should be received in HandleEvent(), but it does not.

comment:3 by Barrett, 10 years ago

I'm not convinced by the SetValue at line 653 in DefaultMediaTheme, is it correct to pass system_time() here? Might there be need for a little more complex calculus based on current performance time.

Last edited 10 years ago by Barrett (previous) (diff)

comment:4 by Barrett, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev50191.

NOTE: In the end I was right, don't use system_time in place of performance time.

Note: See TracTickets for help on using tickets.