/* Insert header here. */
#ifndef __GDAS_SEQUENCER2_H_
#define __GDAS_SEQUENCER2_H_


typedef struct _GdasSequencer2 GdasSequencer2;
typedef struct _GdasSequencer2Class GdasSequencer2Class;

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include "gdassource.h"
#include "gdamintervalmap.h"

GtkType gdas_sequencer2_get_type();
#define GDAS_TYPE_SEQUENCER2	          (gdas_sequencer2_get_type ())
#define GDAS_SEQUENCER2(obj)              (GTK_CHECK_CAST ((obj), GDAS_TYPE_SEQUENCER2, GdasSequencer2))
#define GDAS_SEQUENCER2_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), GDAS_TYPE_SEQUENCER2, GdasSequencer2Class))
#define GDAS_SEQUENCER2_GET_CLASS(obj)    (GDAS_SEQUENCER2_CLASS(GTK_OBJECT(obj)->klass))
#define GDAS_IS_SEQUENCER2(obj)           (GTK_CHECK_TYPE ((obj), GDAS_TYPE_SEQUENCER2))
#define GDAS_IS_SEQUENCER2_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), GDAS_TYPE_SEQUENCER2))

typedef struct _GdasSequencer2Element GdasSequencer2Element;

struct _GdasSequencer2Class {
  GdasSourceClass	source_class;
};
struct _GdasSequencer2 {
  GdasSource		 source;
  int                    num_elements;
  GdasSequencer2Element *elements;
  GdamIntervalMap       *map;

  int                    position;
  int                    sequence_length;
};

void     gdas_sequencer2_clear     (GdasSequencer2      *sequencer);
gboolean gdas_sequencer2_add       (GdasSequencer2      *sequencer,
                                    int                  buffer_id,
				    int                  start_offset,
				    GdamFixed            rate,
				    GdamFixed            gain,
				    int                  offset,
				    int                  output_length);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif
