2008-02-21 07:39:00 +01:00
|
|
|
|
|
|
|
/*******************************************************************************/
|
|
|
|
/* Copyright (C) 2008 Jonathan Moore Liles */
|
|
|
|
/* */
|
|
|
|
/* This program is free software; you can redistribute it and/or modify it */
|
|
|
|
/* under the terms of the GNU General Public License as published by the */
|
|
|
|
/* Free Software Foundation; either version 2 of the License, or (at your */
|
|
|
|
/* option) any later version. */
|
|
|
|
/* */
|
|
|
|
/* This program 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 General Public License for */
|
|
|
|
/* more details. */
|
|
|
|
/* */
|
|
|
|
/* You should have received a copy of the GNU General Public License along */
|
|
|
|
/* with This program; see the file COPYING. If not,write to the Free Software */
|
|
|
|
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
/*******************************************************************************/
|
|
|
|
|
2008-05-22 17:32:26 +02:00
|
|
|
|
2008-02-21 07:39:00 +01:00
|
|
|
#pragma once
|
|
|
|
|
2008-04-19 06:16:21 +02:00
|
|
|
#include "Sequence.H"
|
2008-05-05 02:04:20 +02:00
|
|
|
#include "Audio_Region.H"
|
2008-04-07 12:00:16 +02:00
|
|
|
|
2008-02-21 08:17:49 +01:00
|
|
|
#include <FL/Fl_Input.H>
|
2012-12-11 06:47:44 +01:00
|
|
|
class Audio_Sequence_Header;
|
2008-02-21 08:17:49 +01:00
|
|
|
|
2008-05-05 07:29:39 +02:00
|
|
|
class Audio_Sequence : public Sequence
|
2008-02-21 07:39:00 +01:00
|
|
|
{
|
|
|
|
|
2008-04-20 04:15:54 +02:00
|
|
|
protected:
|
|
|
|
|
2008-05-05 07:29:39 +02:00
|
|
|
void get ( Log_Entry &e ) const;
|
2008-04-20 23:46:47 +02:00
|
|
|
|
2008-05-05 07:29:39 +02:00
|
|
|
void set ( Log_Entry &e );
|
2008-04-20 23:46:47 +02:00
|
|
|
|
2008-05-05 07:29:39 +02:00
|
|
|
Audio_Sequence ( ) : Sequence( 0 )
|
2008-04-20 04:15:54 +02:00
|
|
|
{
|
2012-12-11 06:47:44 +01:00
|
|
|
init();
|
2008-04-20 04:15:54 +02:00
|
|
|
}
|
|
|
|
|
2008-05-22 22:34:21 +02:00
|
|
|
void handle_widget_change ( nframes_t start, nframes_t length );
|
|
|
|
|
2008-06-19 06:14:14 +02:00
|
|
|
void draw ( void );
|
|
|
|
|
2012-12-11 06:47:44 +01:00
|
|
|
static void cb_button ( Fl_Widget *w, void *v );
|
|
|
|
void cb_button ( Fl_Widget *w );
|
|
|
|
|
|
|
|
void init ( void );
|
|
|
|
|
2008-02-21 07:39:00 +01:00
|
|
|
public:
|
|
|
|
|
2013-04-22 08:14:52 +02:00
|
|
|
int handle ( int m );
|
|
|
|
|
2008-04-20 04:15:54 +02:00
|
|
|
LOG_CREATE_FUNC( Audio_Sequence );
|
|
|
|
|
2012-12-11 06:47:44 +01:00
|
|
|
Audio_Sequence_Header * header ( void ) { return (Audio_Sequence_Header*)child(0); }
|
|
|
|
|
2008-12-02 07:14:25 +01:00
|
|
|
Audio_Sequence ( Track *track, const char *name = 0 );
|
2008-05-05 07:29:39 +02:00
|
|
|
~Audio_Sequence ( );
|
2008-02-21 13:57:33 +01:00
|
|
|
|
2008-06-19 06:14:14 +02:00
|
|
|
Fl_Cursor cursor ( void ) const { return FL_CURSOR_DEFAULT; }
|
2008-03-09 18:56:17 +01:00
|
|
|
|
2012-05-31 07:58:35 +02:00
|
|
|
virtual Sequence * clone_empty ( void )
|
|
|
|
{
|
|
|
|
Audio_Sequence *t = new Audio_Sequence( track() );
|
|
|
|
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual Sequence * clone_empty ( const char *name )
|
2008-03-09 18:56:17 +01:00
|
|
|
{
|
2008-12-02 07:14:25 +01:00
|
|
|
Audio_Sequence *t = new Audio_Sequence( track(), name );
|
2008-03-09 18:56:17 +01:00
|
|
|
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
2012-12-11 06:47:44 +01:00
|
|
|
virtual void name ( const char *s );
|
|
|
|
virtual const char *name ( void ) const;
|
|
|
|
|
2008-05-23 04:23:41 +02:00
|
|
|
const Audio_Region *capture_region ( void ) const;
|
2008-04-25 09:07:18 +02:00
|
|
|
|
2008-04-07 12:00:16 +02:00
|
|
|
nframes_t play ( sample_t *buf, nframes_t frame, nframes_t nframes, int channels );
|
2008-04-07 10:12:01 +02:00
|
|
|
|
2008-02-21 07:39:00 +01:00
|
|
|
};
|