[BACK]Return to aproc.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/Attic/aproc.h between version 1.31 and 1.32

version 1.31, 2010/04/03 17:59:17 version 1.32, 2010/04/06 20:07:01
Line 130 
Line 130 
         union {                                 /* follow type-specific data */          union {                                 /* follow type-specific data */
                 struct {                        /* file/device io */                  struct {                        /* file/device io */
                         struct file *file;      /* file to read/write */                          struct file *file;      /* file to read/write */
                           unsigned partial;       /* bytes of partial frame */
                 } io;                  } io;
                 struct {                  struct {
                         unsigned idle;          /* frames since idleing */                          unsigned idle;          /* frames since idleing */
                           unsigned round;         /* block size, for xruns */
                         int lat;                /* current latency */                          int lat;                /* current latency */
                         int maxlat;             /* max latency allowed */                          int maxlat;             /* max latency allowed */
                         struct aproc *ctl;                          unsigned abspos;        /* frames produced */
                           struct aproc *ctl;      /* MIDI control/sync */
                           struct aproc *mon;      /* snoop output */
                 } mix;                  } mix;
                 struct {                  struct {
                         unsigned idle;          /* frames since idleing */                          unsigned idle;          /* frames since idleing */
                           unsigned round;         /* block size, for xruns */
                         int lat;                /* current latency */                          int lat;                /* current latency */
                         int maxlat;             /* max latency allowed */                          int maxlat;             /* max latency allowed */
                           unsigned abspos;        /* frames consumed */
                         struct aproc *ctl;                          struct aproc *ctl;
                 } sub;                  } sub;
                 struct {                  struct {
                           int delta;              /* time position */
                           unsigned bufsz;         /* buffer size (latency) */
                           unsigned pending;       /* uncommited samples */
                   } mon;
                   struct {
 #define RESAMP_NCTX     2  #define RESAMP_NCTX     2
                         unsigned ctx_start;                          unsigned ctx_start;
                         short ctx[NCHAN_MAX * RESAMP_NCTX];                          short ctx[NCHAN_MAX * RESAMP_NCTX];
                         unsigned iblksz, oblksz;                          unsigned iblksz, oblksz;
                         int diff;                          int diff;
                         int idelta, odelta;     /* remainder of resamp_[io]pos */                          int idelta, odelta;     /* remainder of resamp_xpos */
                 } resamp;                  } resamp;
                 struct {                  struct {
                         short ctx[NCHAN_MAX];                          short ctx[NCHAN_MAX];
Line 191 
Line 202 
                                 struct ctl_ops {                                  struct ctl_ops {
                                         void (*vol)(void *, unsigned);                                          void (*vol)(void *, unsigned);
                                         void (*start)(void *);                                          void (*start)(void *);
                                           void (*stop)(void *);
                                           void (*loc)(void *, unsigned);
                                 } *ops;                                  } *ops;
                                 void *arg;                                  void *arg;
                                 unsigned unit;                                  unsigned unit;
Line 203 
Line 216 
         } u;          } u;
 };  };
   
   /*
    * Check if the given pointer is a valid aproc structure.
    *
    * aproc structures are not free()'d immediately, because
    * there may be pointers to them, instead the APROC_ZOMB flag
    * is set which means that they should not be used. When
    * aprocs reference counter reaches zero, they are actually
    * freed
    */
   #define APROC_OK(p) ((p) && !((p)->flags & APROC_ZOMB))
   
   
 struct aproc *aproc_new(struct aproc_ops *, char *);  struct aproc *aproc_new(struct aproc_ops *, char *);
 void aproc_del(struct aproc *);  void aproc_del(struct aproc *);
 void aproc_dbg(struct aproc *);  void aproc_dbg(struct aproc *);
Line 210 
Line 235 
 void aproc_setout(struct aproc *, struct abuf *);  void aproc_setout(struct aproc *, struct abuf *);
 int aproc_depend(struct aproc *, struct aproc *);  int aproc_depend(struct aproc *, struct aproc *);
   
   void aproc_ipos(struct aproc *, struct abuf *, int);
   void aproc_opos(struct aproc *, struct abuf *, int);
   
 struct aproc *rfile_new(struct file *);  struct aproc *rfile_new(struct file *);
 struct aproc *wfile_new(struct file *);  struct aproc *wfile_new(struct file *);
 struct aproc *mix_new(char *, int, struct aproc *);  struct aproc *mix_new(char *, int, unsigned, struct aproc *);
 struct aproc *sub_new(char *, int, struct aproc *);  struct aproc *sub_new(char *, int, unsigned, struct aproc *);
 struct aproc *resamp_new(char *, unsigned, unsigned);  struct aproc *resamp_new(char *, unsigned, unsigned);
 struct aproc *cmap_new(char *, struct aparams *, struct aparams *);  struct aproc *cmap_new(char *, struct aparams *, struct aparams *);
 struct aproc *enc_new(char *, struct aparams *);  struct aproc *enc_new(char *, struct aparams *);
 struct aproc *dec_new(char *, struct aparams *);  struct aproc *dec_new(char *, struct aparams *);
   struct aproc *mon_new(char *, unsigned);
   
   int rfile_in(struct aproc *, struct abuf *);
   int rfile_out(struct aproc *, struct abuf *);
   void rfile_eof(struct aproc *, struct abuf *);
   void rfile_hup(struct aproc *, struct abuf *);
   void rfile_done(struct aproc *);
   int rfile_do(struct aproc *, unsigned, unsigned *);
   
   int wfile_in(struct aproc *, struct abuf *);
   int wfile_out(struct aproc *, struct abuf *);
   void wfile_eof(struct aproc *, struct abuf *);
   void wfile_hup(struct aproc *, struct abuf *);
   void wfile_done(struct aproc *);
   int wfile_do(struct aproc *, unsigned, unsigned *);
   
 void mix_setmaster(struct aproc *);  void mix_setmaster(struct aproc *);
 void mix_clear(struct aproc *);  void mix_clear(struct aproc *);
 void mix_prime(struct aproc *);  void mix_prime(struct aproc *);
   void mix_drop(struct abuf *, int);
   void sub_silence(struct abuf *, int);
 void sub_clear(struct aproc *);  void sub_clear(struct aproc *);
   void mon_snoop(struct aproc *, struct abuf *, unsigned, unsigned);
   void mon_clear(struct aproc *);
   
 #endif /* !defined(APROC_H) */  #endif /* !defined(APROC_H) */

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32