public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* force feedback envelope incomplete
@ 2005-10-15 21:39 emard
  2005-10-16 18:35 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: emard @ 2005-10-15 21:39 UTC (permalink / raw)
  To: linux-kernel

HI

Force feedback envelope struct in input.h 
for periodic events is incomplete.

struct ff_envelope {
        __u16 attack_length;    /* Duration of attack (ms) */
        __u16 attack_level;     /* Level at beginning of attack */
        __u16 fade_length;      /* Duration of fade (ms) */
        __u16 fade_level;       /* Level at end of fade */
};

The envelope consists of:
1. Attack level (Level at beginning of attack)
2. Attack time
3. Sustain level (Level at end of attack and beginning of fade)
4. Sustain time
5. Fade level (Level at the end of fade)
6. Fade time

If I want to implement proper envelope I propose something like this:

struct ff_envelope {
        __u16 attack_length;    /* Duration of attack (ms) */
        __u16 attack_level;     /* Level at beginning of attack */
        __u16 sustain_length;   /* Duration of sustain (ms) */
        __u16 sustain_level;    /* Sustain Level at end of attack and beginning of fade */
        __u16 fade_length;      /* Duration of fade (ms) */
        __u16 fade_level;       /* Level at end of fade */
};

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-17 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-15 21:39 force feedback envelope incomplete emard
2005-10-16 18:35 ` Dmitry Torokhov
2005-10-17 11:42   ` Vojtech Pavlik
2005-10-17 22:21     ` emard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox