1 /* 2 * Copyright (C) 2002 2003 2004 2009, Magnus Hjorth 3 * 4 * This file is part of mhWaveEdit. 5 * 6 * mhWaveEdit is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * mhWaveEdit is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with mhWaveEdit; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 22 #ifndef RECORDDIALOG_H_INCLUDED 23 #define RECORDDIALOG_H_INCLUDED 24 25 #include <gtk/gtk.h> 26 #include "chunk.h" 27 #include "int_box.h" 28 #include "datasource.h" 29 #include "vu_meter.h" 30 #include "ringbuf.h" 31 #include "tempfile.h" 32 #include "combo.h" 33 #include "recordformatcombo.h" 34 35 #define RECORD_DIALOG(obj) GTK_CHECK_CAST(obj, record_dialog_get_type(), RecordDialog) 36 #define RECORD_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST(klass,record_dialog_get_type(),RecordDialogClass) 37 #define IS_RECORD_DIALOG(obj) GTK_CHECK_TYPE(obj, record_dialog_get_type()) 38 39 40 typedef struct { 41 42 GtkWindow window; 43 44 RecordFormatCombo *format_combo; 45 gboolean format_changed; 46 GtkBin *vu_frame; 47 GtkLabel *status_label,*time_label,*overruns_label,*overruns_title; 48 GtkLabel *bytes_label,*bytes_text_label,*limit_label,*limit_text_label; 49 GtkWidget *record_button,*reset_button,*close_button; 50 51 Dataformat *current_format; 52 ListObject *driver_presets; 53 gboolean limit_record; 54 GtkEntry *limit_entry; 55 GtkLabel *limit_set_label; 56 GtkButton *disable_limit_button; 57 gfloat limit_seconds; 58 float maxpeak_values[8]; 59 GtkLabel **peak_labels,**maxpeak_labels,**clip_labels,**rms_labels; 60 VuMeter **meters; 61 62 TempFile *tf; 63 gboolean paused; 64 off_t written_bytes; 65 off_t limit_bytes; 66 Ringbuf *databuf; 67 guint32 analysis_bytes; 68 guint32 analysis_samples; 69 gchar *analysis_buf; 70 sample_t *analysis_sbuf; 71 guint overruns_before_start, overruns; 72 off_t overrun_locs[10]; 73 } RecordDialog; 74 75 typedef struct { 76 GtkWindowClass wc; 77 } RecordDialogClass; 78 79 GtkType record_dialog_get_type(void); 80 Chunk *record_dialog_execute(int *noverruns, off_t overrun_locs[10]); 81 82 #endif 83