/*
    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_MP3_H_
#define __GDAS_MP3_H_

#include "gdasexternal.h"

typedef struct _GdasMp3 GdasMp3;
typedef struct _GdasMp3Class GdasMp3Class;
GtkType gdas_mp3_get_type();
#define GDAS_TYPE_MP3   gdas_mp3_get_type()
#define GDAS_MP3(ptr) ((GdasMp3*) gtk_type_check_object_cast ((GtkTypeObject*) (ptr), GDAS_TYPE_MP3))

/* different command-line players we support */
typedef enum
{
  GDAS_EXEC_MPG123,
  GDAS_EXEC_MADPLAY,
  GDAS_EXEC_OGG123,
  GDAS_EXEC_DEFAULT_MP3,
  GDAS_EXEC_TYPE_FROM_STRING,   /*  looks up decoder from exec_cmd_string */
} GdasExecCmd;

struct _GdasMp3Class {
	GdasExternalClass		external_class;
};

struct _GdasMp3 {
	GdasExternal  external;
        char         *filename;
	gint64        start_time;
	int           downsample;	/* only allowed values 1, 2, 4 */

	GdasExecCmd   exec_cmd;
	char         *exec_cmd_string;
};

GdasMp3      *gdas_mp3_new(const char *filename, 
                           GdamTime    start,
			   GdamTime    length);
GdasMp3      *gdas_mp3_new_full (const char *filename, 
                                 GdamTime    start,
			         GdamTime    length,
				 GdasExecCmd exec_cmd,
				 const char *exec_cmd_string);

#endif
