/*
    GDAM - Geoff & Dave's Audio Mixer
    Copyright (C) 1999    Dave Benson, Geoff Matters.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA

    Contact:
        daveb@ffem.org <Dave Benson>
        geoff@ugcs.caltech.edu <Geoff Matters>
*/
#ifndef __GDAS_SEEKABLE_MP3_H__
#define __GDAS_SEEKABLE_MP3_H__

typedef struct _GdasSeekableMp3 GdasSeekableMp3;
typedef struct _GdasSeekableMp3Class GdasSeekableMp3Class;

#include "gdasproxysource.h"
#include "gdasmp3.h"

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


GtkType gdas_seekable_mp3_get_type();
#define GDAS_TYPE_SEEKABLE_MP3              (gdas_seekable_mp3_get_type ())
#define GDAS_SEEKABLE_MP3(obj)              (GTK_CHECK_CAST ((obj), GDAS_TYPE_SEEKABLE_MP3, GdasSeekableMp3))
#define GDAS_SEEKABLE_MP3_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), GDAS_TYPE_SEEKABLE_MP3, GdasSeekableMp3Class))
#define GDAM_IS_SEEKABLE_MP3(obj)           (GTK_CHECK_TYPE ((obj), GDAS_TYPE_SEEKABLE_MP3))
#define GDAM_IS_SEEKABLE_MP3_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), GDAS_TYPE_SEEKABLE_MP3))

struct _GdasSeekableMp3 {
  GdasProxySource       proxy_source;
  char                 *filename;
  GdamTime              stopped_position;
  GdamTime              stopped_length;

  gboolean              never_miss_data;
  int                   buffer_size;
  gboolean		use_gdaswav;
  GdasExecCmd           exec_cmd;
  char                 *exec_cmd_string;
};

GdasSeekableMp3 *gdas_seekable_mp3_new          (const char      *filename,
                                                 GdamTime         start);
void             gdas_seekable_mp3_seek_start   (GdasSeekableMp3 *mp3,
                                                 GdamTime         samples);
void             gdas_seekable_mp3_seek_relative(GdasSeekableMp3 *mp3,
                                                 GdamTime         samples);
void             gdas_seekable_mp3_seek_absolute(GdasSeekableMp3 *mp3,
                                                 GdamTime         samples);

#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif
