annotate src/lame/out_lame.c @ 670:c92018172bfb trunk

[svn] - don't crash on startup by passing NULL to opendir(2)
author nenolod
date Sun, 18 Feb 2007 03:38:05 -0800
parents 622c63a5c191
children b006af49413e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
668
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1 /* Out_Lame-Plugin
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2 * (C) copyright 2002 Lars Siebold <khandha5@gmx.net>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
3 * (C) copyright 2006-2007 porting to audacious by Yoshiki Yazawa <yaz@cc.rim.or.jp>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
4 *
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
5 * Based on the diskwriter-plugin of XMMS.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
6 *
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
10 * (at your option) any later version.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
11 *
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
15 * GNU General Public License for more details.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
16 *
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
20 */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
21
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
22 #include <gtk/gtk.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
23 #include <stdio.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
24 #include <string.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
25 #include <dirent.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
26
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
27 #include <audacious/plugin.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
28 #include <audacious/beepctrl.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
29 #include <audacious/dirbrowser.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
30 #include <audacious/configdb.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
31 #include <audacious/util.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
32
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
33 #include <lame/lame.h>
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
34
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
35 #define ENCBUFFER_SIZE 35000
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
36 #define OUT_LAME_VER "0.2d6"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
37 #define DEBUG 1
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
38 #undef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
39
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
40 GtkWidget *configure_win = NULL, *path_vbox;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
41 GtkWidget *path_hbox, *path_label, *path_entry, *path_browse,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
42 *path_dirbrowser = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
43 GtkWidget *configure_separator;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
44 GtkWidget *configure_bbox, *configure_ok, *configure_cancel;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
45 GtkWidget *alg_quality_spin;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
46 GtkWidget *alg_quality_label, *alg_quality_hbox;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
47 GtkObject *alg_quality_adj;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
48 GtkWidget *vbox, *notebook;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
49 GtkWidget *quality_vbox, *quality_hbox1, *alg_quality_frame;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
50 GtkWidget *enc_quality_frame, *enc_quality_vbox1, *enc_quality_vbox2,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
51 *enc_quality_hbox, *enc_quality_label1, *enc_quality_label2;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
52 GtkWidget *enc_radio1, *enc_radio2, *bitrate_option_menu, *bitrate_menu,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
53 *bitrate_menu_item, *kbps_label;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
54 GtkWidget *compression_spin, *compression_label;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
55 GtkObject *compression_adj;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
56 GtkWidget *mode_hbox, *mode_option_menu, *mode_menu, *mode_label,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
57 *mode_frame, *mode_menu_item, *ms_mode_toggle, *use_source_file_path, *prepend_track_number;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
58 GtkWidget *samplerate_hbox, *samplerate_option_menu, *samplerate_menu,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
59 *samplerate_label, *samplerate_frame, *samplerate_menu_item;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
60 GtkWidget *misc_frame, *misc_vbox, *enforce_iso_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
61 *error_protection_toggle;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
62 GtkTooltips *quality_tips, *vbr_tips, *tags_tips;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
63 GtkWidget *vbr_vbox, *vbr_toggle, *vbr_options_vbox, *vbr_type_frame,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
64 *vbr_type_hbox, *vbr_type_radio1, *vbr_type_radio2;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
65 GtkWidget *abr_frame, *abr_option_menu, *abr_menu, *abr_menu_item,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
66 *abr_hbox, *abr_label;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
67 GtkWidget *vbr_frame, *vbr_options_vbox2;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
68 GtkWidget *vbr_options_hbox1, *vbr_min_option_menu, *vbr_min_menu,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
69 *vbr_min_menu_item, *vbr_min_label;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
70 GtkWidget *vbr_options_hbox2, *vbr_max_option_menu, *vbr_max_menu,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
71 *vbr_max_menu_item, *vbr_max_label, *enforce_min_toggle;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
72 GtkWidget *vbr_options_hbox3, *vbr_quality_spin, *vbr_quality_label;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
73 GtkObject *vbr_quality_adj;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
74 GtkWidget *xing_header_toggle;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
75 GtkWidget *tags_vbox, *tags_frames_frame, *tags_frames_hbox,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
76 *tags_copyright_toggle, *tags_original_toggle;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
77 GtkWidget *tags_id3_frame, *tags_id3_vbox, *tags_id3_hbox,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
78 *tags_force_id3v2_toggle, *tags_only_v1_toggle, *tags_only_v2_toggle;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
79
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
80 GtkWidget *enc_quality_vbox, *hbox1, *hbox2;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
81
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
82 // will be used in flushing
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
83 AFormat oldfmt;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
84 gint oldrate, oldnch;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
85
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
86 static gchar *file_path = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
87 static FILE *output_file = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
88 static guint64 written = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
89 static guint64 olen = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
90 static AFormat afmt;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
91 gint ctrlsocket_get_session_id(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
92
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
93 static guint64 offset = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
94
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
95 int inside;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
96 static gint vbr_on = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
97 static gint vbr_type = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
98 static gint vbr_min_val = 32;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
99 static gint vbr_max_val = 320;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
100 static gint enforce_min_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
101 static gint vbr_quality_val = 4;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
102 static gint abr_val = 128;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
103 static gint toggle_xing_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
104 static gint mark_original_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
105 static gint mark_copyright_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
106 static gint force_v2_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
107 static gint only_v1_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
108 static gint only_v2_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
109 static gint algo_quality_val = 5;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
110 static gint out_samplerate_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
111 static gint bitrate_val = 128;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
112 static gfloat compression_val = 11;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
113 static gint enc_toggle_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
114 static gint audio_mode_val = 4;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
115 static gint auto_ms_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
116 static gint enforce_iso_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
117 static gint error_protect_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
118 static gint srate;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
119 static gint inch;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
120 static gint b_use_source_file_path = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
121 static gint b_prepend_track_number = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
122
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
123 // for id3 tag
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
124 static TitleInput *tuple = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
125 extern TitleInput *input_get_song_tuple(const gchar * filename);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
126
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
127 typedef struct {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
128 gchar *track_name;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
129 gchar *album_name;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
130 gchar *performer;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
131 gchar *genre;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
132 gchar *year;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
133 gchar *track_number;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
134 } lameid3_t;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
135
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
136 lameid3_t lameid3;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
137
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
138 static void outlame_init(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
139 static void outlame_about(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
140 static gint outlame_open(AFormat fmt, gint rate, gint nch);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
141 static void outlame_write(void *ptr, gint length);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
142 static void outlame_close(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
143 static void outlame_flush(gint time);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
144 static void outlame_pause(short p);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
145 static gint outlame_free(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
146 static gint outlame_playing(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
147 static gint outlame_get_written_time(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
148 static gint outlame_get_output_time(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
149 static void outlame_configure(void);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
150
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
151 lame_global_flags *gfp;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
152 int lame_init_return;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
153 int encout;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
154 static unsigned char encbuffer[ENCBUFFER_SIZE];
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
155
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
156 OutputPlugin outlame_op = {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
157 NULL,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
158 NULL,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
159 NULL, /* Description */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
160 outlame_init,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
161 NULL,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
162 outlame_about,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
163 outlame_configure,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
164 NULL, /* get_volume */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
165 NULL, /* set_volume */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
166 outlame_open,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
167 outlame_write,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
168 outlame_close,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
169 outlame_flush,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
170 outlame_pause,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
171 outlame_free,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
172 outlame_playing,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
173 outlame_get_output_time,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
174 outlame_get_written_time,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
175 NULL
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
176 };
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
177
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
178 void free_lameid3(lameid3_t *p)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
179 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
180 g_free(p->track_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
181 g_free(p->album_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
182 g_free(p->performer);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
183 g_free(p->genre);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
184 g_free(p->year);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
185 g_free(p->track_number);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
186
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
187 p->track_name = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
188 p->album_name = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
189 p->performer = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
190 p->genre = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
191 p->year = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
192 p->track_number = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
193
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
194 };
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
195
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
196
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
197 OutputPlugin *get_oplugin_info(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
198 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
199 outlame_op.description = g_strdup_printf("Out-Lame %s", OUT_LAME_VER);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
200 return &outlame_op;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
201 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
202
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
203 static void lame_debugf(const char *format, va_list ap)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
204 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
205 (void) vfprintf(stdout, format, ap);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
206 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
207
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
208 static void outlame_init(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
209 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
210 ConfigDb *db;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
211
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
212 db = bmp_cfg_db_open();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
213
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
214 bmp_cfg_db_get_string(db, "out_lame", "file_path", &file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
215 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
216 printf("fle_path = %s\n", file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
217 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
218 //validate the path
670
c92018172bfb [svn] - don't crash on startup by passing NULL to opendir(2)
nenolod
parents: 668
diff changeset
219 if(file_path != NULL && opendir(file_path) == NULL) { //error
668
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
220 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
221 printf("file_path freed\n");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
222 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
223 g_free(file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
224 file_path = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
225 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
226
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
227 bmp_cfg_db_get_int(db, "out_lame", "use_source_file_path",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
228 &b_use_source_file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
229 bmp_cfg_db_get_int(db, "out_lame", "vbr_on", &vbr_on);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
230 bmp_cfg_db_get_int(db, "out_lame", "vbr_type", &vbr_type);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
231 bmp_cfg_db_get_int(db, "out_lame", "vbr_min_val", &vbr_min_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
232 bmp_cfg_db_get_int(db, "out_lame", "vbr_max_val", &vbr_max_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
233 bmp_cfg_db_get_int(db, "out_lame", "enforce_min_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
234 &enforce_min_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
235 bmp_cfg_db_get_int(db, "out_lame", "vbr_quality_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
236 &vbr_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
237 bmp_cfg_db_get_int(db, "out_lame", "abr_val", &abr_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
238 bmp_cfg_db_get_int(db, "out_lame", "toggle_xing_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
239 &toggle_xing_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
240 bmp_cfg_db_get_int(db, "out_lame", "mark_original_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
241 &mark_original_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
242 bmp_cfg_db_get_int(db, "out_lame", "mark_copyright_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
243 &mark_copyright_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
244 bmp_cfg_db_get_int(db, "out_lame", "force_v2_val", &force_v2_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
245 bmp_cfg_db_get_int(db, "out_lame", "only_v1_val", &only_v1_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
246 bmp_cfg_db_get_int(db, "out_lame", "only_v2_val", &only_v2_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
247 bmp_cfg_db_get_int(db, "out_lame", "algo_quality_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
248 &algo_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
249 bmp_cfg_db_get_int(db, "out_lame", "out_samplerate_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
250 &out_samplerate_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
251 bmp_cfg_db_get_int(db, "out_lame", "bitrate_val", &bitrate_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
252 bmp_cfg_db_get_float(db, "out_lame", "compression_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
253 &compression_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
254 bmp_cfg_db_get_int(db, "out_lame", "enc_toggle_val", &enc_toggle_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
255 bmp_cfg_db_get_int(db, "out_lame", "audio_mode_val", &audio_mode_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
256 bmp_cfg_db_get_int(db, "out_lame", "auto_ms_val", &auto_ms_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
257 bmp_cfg_db_get_int(db, "out_lame", "enforce_iso_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
258 &enforce_iso_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
259 bmp_cfg_db_get_int(db, "out_lame", "error_protect_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
260 &error_protect_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
261 bmp_cfg_db_get_int(db, "out_lame", "prepend_track_number",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
262 &b_prepend_track_number);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
263
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
264 bmp_cfg_db_close(db);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
265
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
266 if (!file_path)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
267 file_path = g_strdup(g_get_home_dir());
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
268
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
269 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
270
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
271
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
272 void outlame_about(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
273 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
274 static GtkWidget *dialog;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
275
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
276 if (dialog != NULL)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
277 return;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
278
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
279 dialog = xmms_show_message("About Lame-Output-Plugin",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
280 "Lame-Output-Plugin\n\n "
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
281 "This program is free software; you can redistribute it and/or modify\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
282 "it under the terms of the GNU General Public License as published by\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
283 "the Free Software Foundation; either version 2 of the License, or\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
284 "(at your option) any later version.\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
285 "\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
286 "This program is distributed in the hope that it will be useful,\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
287 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
288 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
289 "GNU General Public License for more details.\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
290 "\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
291 "You should have received a copy of the GNU General Public License\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
292 "along with this program; if not, write to the Free Software\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
293 "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
294 "USA.", "Ok", FALSE, NULL, NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
295 gtk_signal_connect(GTK_OBJECT(dialog), "destroy",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
296 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
297 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
298
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
299
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
300 static gint outlame_open(AFormat fmt, gint rate, gint nch)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
301 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
302
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
303 gchar *filename, *title = NULL, *temp;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
304 gint pos;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
305 int b_use_path_anyway = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
306 gchar *tmpfilename = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
307 gchar *tmp = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
308
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
309 /* store open paramators for reopen */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
310 oldfmt = fmt; oldrate = rate; oldnch = nch;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
311
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
312 /* So all the values will be reset to the ones saved */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
313 /* Easier than to implement a tmp variable for every value */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
314 outlame_init();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
315
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
316 written = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
317 afmt = fmt;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
318
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
319 if (xmms_check_realtime_priority()) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
320 xmms_show_message("Error",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
321 "You cannot use the Lame-Output plugin\n"
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
322 "when you're running in realtime mode.",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
323 "Ok", FALSE, NULL, NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
324 return 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
325 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
326
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
327 pos = xmms_remote_get_playlist_pos(ctrlsocket_get_session_id());
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
328
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
329 if (title == NULL || strlen(g_basename(title)) == 0) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
330 gchar *utf8 = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
331 g_free(title);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
332 /* No filename, lets try title instead */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
333 utf8 = xmms_remote_get_playlist_title(ctrlsocket_get_session_id(), pos);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
334 g_strchomp(utf8); //chop trailing ^J --yaz
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
335
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
336 title = g_locale_from_utf8(utf8, -1, NULL, NULL, NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
337 g_free(utf8);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
338 while (title != NULL && (temp = strchr(title, '/')) != NULL)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
339 *temp = '-';
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
340
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
341 if (title == NULL || strlen(g_basename(title)) == 0) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
342 g_free(title);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
343 /* No title either. Just set it to something. */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
344 title = g_strdup_printf("aud-%d", pos);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
345 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
346 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
347 /* That's a stream, save it to the default path anyway ... */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
348 if (strstr(title, "//") != NULL)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
349 b_use_path_anyway = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
350
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
351
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
352 // get file_path from tuple and regrad as the destination path.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
353 tmpfilename = xmms_remote_get_playlist_file(ctrlsocket_get_session_id(), pos);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
354 tuple = input_get_song_tuple(tmpfilename);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
355 g_free(tmpfilename);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
356
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
357
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
358 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
359 if(tuple) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
360 printf("tuple->file_path = %s\n", tuple->file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
361 printf("tuple->track_number = %d\n", tuple->track_number);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
362 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
363 printf("file_path = %s\n", file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
364 printf("anyway = %d\n", b_use_path_anyway);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
365 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
366
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
367 // if (tuple && b_use_source_file_path == 1 && b_use_path_anyway == 0) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
368 if (tuple && !b_use_path_anyway) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
369 if (b_prepend_track_number && tuple->track_number) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
370 filename = g_strdup_printf("%s/%.02d %s.mp3",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
371 b_use_source_file_path ? tuple->file_path : file_path,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
372 tuple->track_number, title);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
373 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
374 else {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
375 filename = g_strdup_printf("%s/%s.mp3",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
376 b_use_source_file_path ? tuple->file_path : file_path, title);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
377 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
378 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
379 else { // no tuple || b_use_path_anyway
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
380 filename = g_strdup_printf("%s/%s.mp3", file_path, g_basename(title));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
381 g_free(title);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
382 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
383
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
384 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
385 printf("filename = %s\n", filename);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
386 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
387 output_file = fopen(filename, "w");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
388 g_free(filename);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
389
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
390 if (!output_file)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
391 return 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
392
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
393 if ((int) (gfp = lame_init()) == -1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
394 return 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
395
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
396 srate = rate;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
397 inch = nch;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
398
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
399 /* setup id3 data */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
400 id3tag_init(gfp);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
401
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
402 if (tuple) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
403 /* XXX write UTF-8 even though libmp3lame does id3v2.3. --yaz */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
404 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
405 g_print("track_name = %s\n", tuple->track_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
406 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
407 lameid3.track_name = g_strdup(tuple->track_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
408 id3tag_set_title(gfp, lameid3.track_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
409
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
410 lameid3.performer = g_strdup(tuple->performer);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
411 id3tag_set_artist(gfp, lameid3.performer);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
412
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
413 lameid3.album_name = g_strdup(tuple->album_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
414 id3tag_set_album(gfp, lameid3.album_name);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
415
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
416 lameid3.genre = g_strdup(tuple->genre);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
417 id3tag_set_genre(gfp, lameid3.genre);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
418
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
419 lameid3.year = g_strdup_printf("%d", tuple->year);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
420 id3tag_set_year(gfp, lameid3.year);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
421
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
422 lameid3.track_number = g_strdup_printf("%d", tuple->track_number);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
423 id3tag_set_track(gfp, lameid3.track_number);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
424
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
425 // id3tag_write_v1(gfp);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
426 id3tag_add_v2(gfp);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
427
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
428 bmp_title_input_free(tuple);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
429 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
430
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
431
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
432 /* input stream description */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
433
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
434 lame_set_in_samplerate(gfp, rate);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
435 lame_set_num_channels(gfp, nch);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
436 /* Maybe implement this? */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
437 /* lame_set_scale(lame_global_flags *, float); */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
438 lame_set_out_samplerate(gfp, out_samplerate_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
439
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
440 /* general control parameters */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
441
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
442 lame_set_bWriteVbrTag(gfp, toggle_xing_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
443 lame_set_quality(gfp, algo_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
444 if (audio_mode_val != 4) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
445 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
446 printf("set mode to %d\n", audio_mode_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
447 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
448 lame_set_mode(gfp, audio_mode_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
449 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
450 if(auto_ms_val)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
451 lame_set_mode_automs(gfp, auto_ms_val); // this forces to use joint stereo!! --yaz.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
452
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
453 lame_set_errorf(gfp, lame_debugf);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
454 lame_set_debugf(gfp, lame_debugf);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
455 lame_set_msgf(gfp, lame_debugf);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
456
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
457 if (enc_toggle_val == 0 && vbr_on == 0)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
458 lame_set_brate(gfp, bitrate_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
459 else if (vbr_on == 0)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
460 lame_set_compression_ratio(gfp, compression_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
461
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
462 /* frame params */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
463
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
464 lame_set_copyright(gfp, mark_copyright_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
465 lame_set_original(gfp, mark_original_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
466 lame_set_error_protection(gfp, error_protect_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
467 lame_set_strict_ISO(gfp, enforce_iso_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
468
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
469 if (vbr_on != 0) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
470 if (vbr_type == 0)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
471 lame_set_VBR(gfp, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
472 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
473 lame_set_VBR(gfp, 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
474 lame_set_VBR_q(gfp, vbr_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
475 lame_set_VBR_mean_bitrate_kbps(gfp, abr_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
476 lame_set_VBR_min_bitrate_kbps(gfp, vbr_min_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
477 lame_set_VBR_max_bitrate_kbps(gfp, vbr_max_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
478 lame_set_VBR_hard_min(gfp, enforce_min_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
479 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
480
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
481 if (lame_init_params(gfp) == -1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
482 return 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
483
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
484 return 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
485 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
486
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
487 static void outlame_write(void *ptr, gint length)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
488 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
489
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
490 if (inch == 1) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
491 encout =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
492 lame_encode_buffer(gfp, ptr, ptr, length / 2, encbuffer,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
493 ENCBUFFER_SIZE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
494 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
495 else {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
496 encout =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
497 lame_encode_buffer_interleaved(gfp, ptr, length / 4, encbuffer,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
498 ENCBUFFER_SIZE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
499 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
500 fwrite(encbuffer, 1, encout, output_file);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
501 written += encout;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
502 olen += length;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
503
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
504 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
505
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
506 static void outlame_close(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
507 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
508 if (output_file) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
509
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
510 encout = lame_encode_flush_nogap(gfp, encbuffer, ENCBUFFER_SIZE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
511 fwrite(encbuffer, 1, encout, output_file);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
512
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
513 // lame_mp3_tags_fid(gfp, output_file); // will erase id3v2 tag??
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
514
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
515 fclose(output_file);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
516 lame_close(gfp);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
517
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
518 free_lameid3(&lameid3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
519
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
520 written = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
521 olen = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
522 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
523
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
524 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
525 printf("close called\n");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
526 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
527 output_file = NULL;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
528
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
529 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
530
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
531 static void outlame_flush(gint time)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
532 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
533 // some input plugins (typically aac for libmp4) call flush() with an
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
534 // argument like -1000 every end of playing a song.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
535 // it would break lame context.
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
536 if (time < 0) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
537 return;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
538 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
539 outlame_close();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
540 outlame_open(oldfmt, oldrate, oldnch);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
541 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
542 printf("flush %d\n", time);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
543 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
544 offset = time;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
545 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
546
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
547 static void outlame_pause(short p)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
548 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
549 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
550
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
551 static gint outlame_free(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
552 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
553 return 1000000;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
554 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
555
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
556 static gint outlame_playing(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
557 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
558 return 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
559 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
560
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
561 static gint outlame_get_written_time(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
562 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
563 gint time;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
564 if (srate && inch) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
565 time = (gint) ((olen * 1000) / (srate * 2 * inch));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
566 return time + offset;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
567 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
568
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
569 return 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
570 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
571
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
572 static gint outlame_get_output_time(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
573 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
574 return outlame_get_written_time();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
575 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
576
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
577 /*****************/
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
578 /* Configuration */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
579 /*****************/
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
580
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
581 /* Various Singal-Fuctions */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
582
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
583 static void algo_qual(GtkAdjustment * adjustment, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
584 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
585
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
586 algo_quality_val =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
587 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
588 (alg_quality_spin));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
589
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
590 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
591
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
592 static void samplerate_activate(GtkMenuItem * menuitem, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
593 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
594
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
595 out_samplerate_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
596
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
597 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
598
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
599 static void bitrate_activate(GtkMenuItem * menuitem, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
600 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
601
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
602 bitrate_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
603
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
604 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
605
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
606 static void compression_change(GtkAdjustment * adjustment,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
607 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
608 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
609
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
610 compression_val =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
611 gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
612 (compression_spin));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
613
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
614 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
615
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
616 static void encoding_toggle(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
617 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
618 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
619
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
620 enc_toggle_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
621
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
622 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
623
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
624 static void mode_activate(GtkMenuItem * menuitem, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
625 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
626
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
627 audio_mode_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
628
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
629 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
630
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
631 static void toggle_auto_ms(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
632 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
633 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
634
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
635 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ms_mode_toggle)) ==
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
636 TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
637 auto_ms_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
638 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
639 auto_ms_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
640
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
641 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
642
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
643 static void toggle_enforce_iso(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
644 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
645 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
646
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
647 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enforce_iso_toggle))
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
648 == TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
649 enforce_iso_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
650 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
651 enforce_iso_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
652
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
653 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
654
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
655 static void toggle_error_protect(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
656 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
657 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
658
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
659 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
660 (GTK_TOGGLE_BUTTON(error_protection_toggle)) == TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
661 error_protect_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
662 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
663 error_protect_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
664
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
665 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
666
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
667 static void toggle_vbr(GtkToggleButton * togglebutton, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
668 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
669 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(vbr_toggle)) ==
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
670 TRUE) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
671 gtk_widget_set_sensitive(vbr_options_vbox, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
672 gtk_widget_set_sensitive(enc_quality_frame, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
673 vbr_on = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
674
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
675 if (vbr_type == 0) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
676 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
677 (vbr_type_radio1), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
678 gtk_widget_set_sensitive(abr_frame, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
679 gtk_widget_set_sensitive(vbr_frame, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
680 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
681 else if (vbr_type == 1) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
682 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
683 (vbr_type_radio2), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
684 gtk_widget_set_sensitive(abr_frame, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
685 gtk_widget_set_sensitive(vbr_frame, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
686 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
687
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
688 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
689 else {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
690 gtk_widget_set_sensitive(vbr_options_vbox, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
691 gtk_widget_set_sensitive(enc_quality_frame, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
692 vbr_on = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
693 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
694 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
695
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
696 static void vbr_abr_toggle(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
697 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
698 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
699 if (user_data == "VBR") {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
700 gtk_widget_set_sensitive(abr_frame, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
701 gtk_widget_set_sensitive(vbr_frame, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
702 vbr_type = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
703 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
704 else if (user_data == "ABR") {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
705 gtk_widget_set_sensitive(abr_frame, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
706 gtk_widget_set_sensitive(vbr_frame, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
707 vbr_type = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
708 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
709 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
710
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
711 static void vbr_min_activate(GtkMenuItem * menuitem, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
712 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
713
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
714 vbr_min_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
715
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
716 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
717
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
718 static void vbr_max_activate(GtkMenuItem * menuitem, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
719 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
720
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
721 vbr_max_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
722
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
723 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
724
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
725 static void toggle_enforce_min(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
726 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
727 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
728
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
729 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enforce_min_toggle))
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
730 == TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
731 enforce_min_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
732 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
733 enforce_min_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
734
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
735 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
736
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
737 static void vbr_qual(GtkAdjustment * adjustment, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
738 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
739
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
740 vbr_quality_val =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
741 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
742 (vbr_quality_spin));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
743
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
744 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
745
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
746 static void abr_activate(GtkMenuItem * menuitem, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
747 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
748
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
749 abr_val = GPOINTER_TO_INT(user_data);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
750
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
751 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
752
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
753 static void toggle_xing(GtkToggleButton * togglebutton, gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
754 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
755
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
756 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(xing_header_toggle)) == TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
757 toggle_xing_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
758 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
759 toggle_xing_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
760
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
761 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
762
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
763 static void toggle_original(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
764 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
765 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
766
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
767 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
768 (GTK_TOGGLE_BUTTON(tags_original_toggle)) == TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
769 mark_original_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
770 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
771 mark_original_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
772
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
773 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
774
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
775 static void toggle_copyright(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
776 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
777 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
778
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
779 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
780 (GTK_TOGGLE_BUTTON(tags_copyright_toggle)) == TRUE)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
781 mark_copyright_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
782 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
783 mark_copyright_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
784
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
785 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
786
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
787 static void force_v2_toggle(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
788 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
789 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
790
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
791 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
792 (GTK_TOGGLE_BUTTON(tags_force_id3v2_toggle)) == TRUE) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
793 force_v2_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
794 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
795 (GTK_TOGGLE_BUTTON(tags_only_v1_toggle)) == TRUE) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
796 inside = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
797 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
798 (tags_only_v1_toggle), FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
799 only_v1_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
800 inside = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
801 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
802 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
803 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
804 force_v2_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
805
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
806 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
807
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
808 static void id3_only_version(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
809 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
810 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
811 if (user_data == "v1" && inside != 1) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
812 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
813 (GTK_TOGGLE_BUTTON(tags_only_v1_toggle)) == TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
814 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
815 inside = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
816 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
817 (tags_only_v2_toggle), FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
818 only_v1_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
819 only_v2_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
820 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
821 (tags_force_id3v2_toggle), FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
822 inside = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
823 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
824 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
825 else if (user_data == "v2" && inside != 1) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
826 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
827 (GTK_TOGGLE_BUTTON(tags_only_v2_toggle)) == TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
828 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
829 inside = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
830 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
831 (tags_only_v1_toggle), FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
832 only_v1_val = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
833 only_v2_val = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
834 inside = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
835 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
836 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
837
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
838 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
839
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
840 static void path_dirbrowser_cb(gchar * dir)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
841 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
842 gtk_entry_set_text(GTK_ENTRY(path_entry), dir);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
843 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
844
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
845 #if 0
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
846 static void path_browse_cb(GtkWidget * w, gpointer data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
847 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
848 if (!path_dirbrowser) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
849 path_dirbrowser =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
850 xmms_create_dir_browser
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
851 ("Select the directory where you want to store the output files:",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
852 file_path, GTK_SELECTION_SINGLE, path_dirbrowser_cb);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
853 gtk_signal_connect(GTK_OBJECT(path_dirbrowser), "destroy",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
854 GTK_SIGNAL_FUNC(gtk_widget_destroyed),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
855 &path_dirbrowser);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
856 gtk_window_set_transient_for(GTK_WINDOW(path_dirbrowser),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
857 GTK_WINDOW(configure_win));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
858 gtk_widget_show(path_dirbrowser);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
859 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
860 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
861 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
862
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
863 static void use_source_file_path_cb(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
864 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
865 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
866 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
867 (GTK_TOGGLE_BUTTON(use_source_file_path)) == TRUE) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
868 b_use_source_file_path = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
869 gtk_widget_set_sensitive(path_dirbrowser, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
870 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
871 else {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
872 b_use_source_file_path = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
873 gtk_widget_set_sensitive(path_dirbrowser, TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
874 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
875 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
876
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
877 static void prepend_track_number_cb(GtkToggleButton * togglebutton,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
878 gpointer user_data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
879 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
880 if (gtk_toggle_button_get_active
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
881 (GTK_TOGGLE_BUTTON(prepend_track_number)) == TRUE) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
882 b_prepend_track_number = 1;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
883 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
884 else {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
885 b_prepend_track_number = 0;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
886 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
887 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
888
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
889
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
890 /* Save Configuration */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
891
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
892 static void configure_ok_cb(gpointer data)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
893 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
894 ConfigDb *db;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
895
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
896 if (file_path)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
897 g_free(file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
898 file_path = g_strdup(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(path_dirbrowser)));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
899
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
900 #ifdef DEBUG
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
901 printf("ok_cb: fle_path = %s\n", file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
902 #endif
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
903
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
904 if (vbr_min_val > vbr_max_val)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
905 vbr_max_val = vbr_min_val;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
906
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
907 db = bmp_cfg_db_open();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
908
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
909 bmp_cfg_db_set_string(db, "out_lame", "file_path", file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
910 bmp_cfg_db_set_int(db, "out_lame", "use_source_file_path",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
911 b_use_source_file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
912 bmp_cfg_db_set_int(db, "out_lame", "vbr_on", vbr_on);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
913 bmp_cfg_db_set_int(db, "out_lame", "vbr_type", vbr_type);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
914 bmp_cfg_db_set_int(db, "out_lame", "vbr_min_val", vbr_min_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
915 bmp_cfg_db_set_int(db, "out_lame", "vbr_max_val", vbr_max_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
916 bmp_cfg_db_set_int(db, "out_lame", "enforce_min_val", enforce_min_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
917 bmp_cfg_db_set_int(db, "out_lame", "vbr_quality_val", vbr_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
918 bmp_cfg_db_set_int(db, "out_lame", "abr_val", abr_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
919 bmp_cfg_db_set_int(db, "out_lame", "toggle_xing_val", toggle_xing_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
920 bmp_cfg_db_set_int(db, "out_lame", "mark_original_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
921 mark_original_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
922 bmp_cfg_db_set_int(db, "out_lame", "mark_copyright_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
923 mark_copyright_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
924 bmp_cfg_db_set_int(db, "out_lame", "force_v2_val", force_v2_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
925 bmp_cfg_db_set_int(db, "out_lame", "only_v1_val", only_v1_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
926 bmp_cfg_db_set_int(db, "out_lame", "only_v2_val", only_v2_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
927 bmp_cfg_db_set_int(db, "out_lame", "algo_quality_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
928 algo_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
929 bmp_cfg_db_set_int(db, "out_lame", "out_samplerate_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
930 out_samplerate_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
931 bmp_cfg_db_set_int(db, "out_lame", "bitrate_val", bitrate_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
932 bmp_cfg_db_set_float(db, "out_lame", "compression_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
933 compression_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
934 bmp_cfg_db_set_int(db, "out_lame", "enc_toggle_val", enc_toggle_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
935 bmp_cfg_db_set_int(db, "out_lame", "audio_mode_val", audio_mode_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
936 bmp_cfg_db_set_int(db, "out_lame", "auto_ms_val", auto_ms_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
937 bmp_cfg_db_set_int(db, "out_lame", "enforce_iso_val", enforce_iso_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
938 bmp_cfg_db_set_int(db, "out_lame", "error_protect_val",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
939 error_protect_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
940 bmp_cfg_db_set_int(db, "out_lame", "prepend_track_number",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
941 b_prepend_track_number);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
942 bmp_cfg_db_close(db);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
943
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
944
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
945 gtk_widget_destroy(configure_win);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
946 if (path_dirbrowser)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
947 gtk_widget_destroy(path_dirbrowser);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
948 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
949
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
950 static void configure_destroy(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
951 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
952 if (path_dirbrowser)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
953 gtk_widget_destroy(path_dirbrowser);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
954 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
955
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
956
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
957 /************************/
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
958 /* Configuration Widget */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
959 /************************/
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
960
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
961
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
962 static void outlame_configure(void)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
963 {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
964 if (!configure_win) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
965 configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
966
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
967 gtk_signal_connect(GTK_OBJECT(configure_win), "destroy",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
968 GTK_SIGNAL_FUNC(configure_destroy), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
969 gtk_signal_connect(GTK_OBJECT(configure_win), "destroy",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
970 GTK_SIGNAL_FUNC(gtk_widget_destroyed),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
971 &configure_win);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
972 gtk_window_set_title(GTK_WINDOW(configure_win),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
973 "Out-Lame Configuration");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
974 gtk_window_set_position(GTK_WINDOW(configure_win),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
975 GTK_WIN_POS_MOUSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
976 gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
977 FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
978 gtk_container_set_border_width(GTK_CONTAINER(configure_win), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
979
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
980 vbox = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
981 gtk_container_add(GTK_CONTAINER(configure_win), vbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
982
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
983 notebook = gtk_notebook_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
984 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
985
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
986
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
987 /* Quality */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
988
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
989 quality_vbox = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
990 gtk_container_set_border_width(GTK_CONTAINER(quality_vbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
991
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
992 quality_tips = gtk_tooltips_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
993
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
994 quality_hbox1 = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
995 gtk_box_pack_start(GTK_BOX(quality_vbox), quality_hbox1, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
996 FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
997
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
998 /* Algorithm Quality */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
999
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1000 alg_quality_frame = gtk_frame_new("Algorithm Quality:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1001 gtk_container_set_border_width(GTK_CONTAINER(alg_quality_frame),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1002 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1003 gtk_box_pack_start(GTK_BOX(quality_hbox1), alg_quality_frame,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1004 FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1005
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1006 alg_quality_hbox = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1007 gtk_container_set_border_width(GTK_CONTAINER(alg_quality_hbox),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1008 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1009 gtk_container_add(GTK_CONTAINER(alg_quality_frame),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1010 alg_quality_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1011
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1012 alg_quality_adj = gtk_adjustment_new(5, 0, 9, 1, 1, 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1013 alg_quality_spin =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1014 gtk_spin_button_new(GTK_ADJUSTMENT(alg_quality_adj), 8, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1015 gtk_widget_set_usize(alg_quality_spin, 20, 28);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1016 gtk_box_pack_start(GTK_BOX(alg_quality_hbox), alg_quality_spin,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1017 TRUE, TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1018 gtk_signal_connect(GTK_OBJECT(alg_quality_adj), "value-changed",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1019 GTK_SIGNAL_FUNC(algo_qual), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1020
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1021 gtk_tooltips_set_tip(GTK_TOOLTIPS(quality_tips), alg_quality_spin,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1022 "best/slowest:0;\nworst/fastest:9;\nrecommended:2;\ndefault:5;",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1023 "");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1024
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1025 gtk_spin_button_set_value(GTK_SPIN_BUTTON(alg_quality_spin),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1026 algo_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1027
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1028 /* Output Samplerate */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1029
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1030 samplerate_frame = gtk_frame_new("Output Samplerate:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1031 gtk_container_set_border_width(GTK_CONTAINER(samplerate_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1032 gtk_box_pack_start(GTK_BOX(quality_hbox1), samplerate_frame, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1033 FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1034
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1035 samplerate_hbox = gtk_hbox_new(TRUE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1036 gtk_container_set_border_width(GTK_CONTAINER(samplerate_hbox), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1037 gtk_container_add(GTK_CONTAINER(samplerate_frame),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1038 samplerate_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1039 samplerate_option_menu = gtk_option_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1040 samplerate_menu = gtk_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1041 samplerate_menu_item = gtk_menu_item_new_with_label("Auto");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1042 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1043 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1044 GINT_TO_POINTER(0));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1045 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1046 samplerate_menu_item = gtk_menu_item_new_with_label("8");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1047 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1048 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1049 GINT_TO_POINTER(8000));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1050 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1051 samplerate_menu_item = gtk_menu_item_new_with_label("11.025");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1052 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1053 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1054 GINT_TO_POINTER(11025));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1055 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1056 samplerate_menu_item = gtk_menu_item_new_with_label("12");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1057 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1058 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1059 GINT_TO_POINTER(12000));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1060 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1061 samplerate_menu_item = gtk_menu_item_new_with_label("16");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1062 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1063 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1064 GINT_TO_POINTER(16000));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1065 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1066 samplerate_menu_item = gtk_menu_item_new_with_label("22.05");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1067 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1068 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1069 GINT_TO_POINTER(22050));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1070 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1071 samplerate_menu_item = gtk_menu_item_new_with_label("24");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1072 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1073 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1074 GINT_TO_POINTER(24000));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1075 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1076 samplerate_menu_item = gtk_menu_item_new_with_label("32");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1077 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1078 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1079 GINT_TO_POINTER(32000));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1080 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1081 samplerate_menu_item = gtk_menu_item_new_with_label("44.1");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1082 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1083 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1084 GINT_TO_POINTER(44100));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1085 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1086 samplerate_menu_item = gtk_menu_item_new_with_label("48");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1087 gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1088 GTK_SIGNAL_FUNC(samplerate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1089 GINT_TO_POINTER(48000));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1090 gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1091 gtk_option_menu_set_menu(GTK_OPTION_MENU(samplerate_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1092 samplerate_menu);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1093 gtk_widget_set_usize(samplerate_option_menu, 70, 28);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1094 gtk_box_pack_start(GTK_BOX(samplerate_hbox),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1095 samplerate_option_menu, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1096 samplerate_label = gtk_label_new("(kHz)");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1097 gtk_misc_set_alignment(GTK_MISC(samplerate_label), 0, 0.5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1098 gtk_box_pack_start(GTK_BOX(samplerate_hbox), samplerate_label,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1099 FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1100
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1101 switch (out_samplerate_val) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1102
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1103 case 0:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1104 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1105 (samplerate_option_menu), 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1106 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1107 case 8000:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1108 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1109 (samplerate_option_menu), 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1110 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1111 case 11025:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1112 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1113 (samplerate_option_menu), 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1114 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1115 case 12000:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1116 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1117 (samplerate_option_menu), 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1118 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1119 case 16000:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1120 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1121 (samplerate_option_menu), 4);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1122 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1123 case 22050:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1124 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1125 (samplerate_option_menu), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1126 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1127 case 24000:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1128 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1129 (samplerate_option_menu), 6);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1130 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1131 case 32000:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1132 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1133 (samplerate_option_menu), 7);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1134 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1135 case 44100:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1136 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1137 (samplerate_option_menu), 8);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1138 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1139 case 48000:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1140 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1141 (samplerate_option_menu), 9);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1142 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1143
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1144 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1145
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1146 /* Encoder Quality */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1147
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1148 enc_quality_frame = gtk_frame_new("Bitrate / Compression ratio:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1149 gtk_container_set_border_width(GTK_CONTAINER(enc_quality_frame),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1150 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1151 gtk_box_pack_start(GTK_BOX(quality_vbox), enc_quality_frame, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1152 FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1153
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1154
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1155 /* yaz new code */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1156 // vbox sorrounding hbox1 and hbox2
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1157 enc_quality_vbox = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1158 gtk_container_set_border_width(GTK_CONTAINER(enc_quality_vbox), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1159
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1160 // pack vbox to frame
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1161 gtk_container_add(GTK_CONTAINER(enc_quality_frame), enc_quality_vbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1162
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1163 // hbox1 for bitrate
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1164 hbox1 = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1165 gtk_container_add(GTK_CONTAINER(enc_quality_vbox), hbox1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1166
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1167 // radio 1
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1168 enc_radio1 = gtk_radio_button_new(NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1169 if (enc_toggle_val == 0)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1170 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enc_radio1), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1171 gtk_box_pack_start(GTK_BOX(hbox1), enc_radio1, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1172
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1173 // label 1
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1174 enc_quality_label1 = gtk_label_new("Bitrate (kbps):");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1175 gtk_box_pack_start(GTK_BOX(hbox1), enc_quality_label1, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1176
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1177 // bitrate menu
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1178 bitrate_option_menu = gtk_option_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1179 bitrate_menu = gtk_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1180 bitrate_menu_item = gtk_menu_item_new_with_label("8");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1181 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1182 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1183 GINT_TO_POINTER(8));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1184 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1185 bitrate_menu_item = gtk_menu_item_new_with_label("16");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1186 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1187 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1188 GINT_TO_POINTER(16));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1189 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1190 bitrate_menu_item = gtk_menu_item_new_with_label("24");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1191 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1192 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1193 GINT_TO_POINTER(24));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1194 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1195 bitrate_menu_item = gtk_menu_item_new_with_label("32");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1196 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1197 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1198 GINT_TO_POINTER(32));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1199 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1200 bitrate_menu_item = gtk_menu_item_new_with_label("40");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1201 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1202 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1203 GINT_TO_POINTER(40));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1204 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1205 bitrate_menu_item = gtk_menu_item_new_with_label("48");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1206 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1207 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1208 GINT_TO_POINTER(48));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1209 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1210 bitrate_menu_item = gtk_menu_item_new_with_label("56");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1211 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1212 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1213 GINT_TO_POINTER(56));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1214 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1215 bitrate_menu_item = gtk_menu_item_new_with_label("64");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1216 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1217 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1218 GINT_TO_POINTER(64));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1219 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1220 bitrate_menu_item = gtk_menu_item_new_with_label("80");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1221 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1222 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1223 GINT_TO_POINTER(80));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1224 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1225 bitrate_menu_item = gtk_menu_item_new_with_label("96");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1226 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1227 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1228 GINT_TO_POINTER(96));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1229 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1230 bitrate_menu_item = gtk_menu_item_new_with_label("112");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1231 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1232 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1233 GINT_TO_POINTER(112));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1234 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1235 bitrate_menu_item = gtk_menu_item_new_with_label("128");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1236 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1237 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1238 GINT_TO_POINTER(128));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1239 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1240 bitrate_menu_item = gtk_menu_item_new_with_label("160");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1241 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1242 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1243 GINT_TO_POINTER(160));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1244 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1245 bitrate_menu_item = gtk_menu_item_new_with_label("192");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1246 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1247 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1248 GINT_TO_POINTER(192));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1249 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1250 bitrate_menu_item = gtk_menu_item_new_with_label("224");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1251 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1252 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1253 GINT_TO_POINTER(224));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1254 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1255 bitrate_menu_item = gtk_menu_item_new_with_label("256");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1256 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1257 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1258 GINT_TO_POINTER(256));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1259 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1260 bitrate_menu_item = gtk_menu_item_new_with_label("320");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1261 gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1262 GTK_SIGNAL_FUNC(bitrate_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1263 GINT_TO_POINTER(320));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1264 gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1265 gtk_option_menu_set_menu(GTK_OPTION_MENU(bitrate_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1266 bitrate_menu);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1267 gtk_widget_set_usize(bitrate_option_menu, 80, 28);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1268 gtk_box_pack_end(GTK_BOX(hbox1), bitrate_option_menu, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1269
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1270
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1271 switch (bitrate_val) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1272
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1273 case 8:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1274 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1275 (bitrate_option_menu), 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1276 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1277 case 16:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1278 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1279 (bitrate_option_menu), 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1280 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1281 case 24:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1282 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1283 (bitrate_option_menu), 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1284 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1285 case 32:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1286 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1287 (bitrate_option_menu), 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1288 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1289 case 40:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1290 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1291 (bitrate_option_menu), 4);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1292 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1293 case 48:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1294 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1295 (bitrate_option_menu), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1296 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1297 case 56:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1298 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1299 (bitrate_option_menu), 6);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1300 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1301 case 64:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1302 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1303 (bitrate_option_menu), 7);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1304 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1305 case 80:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1306 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1307 (bitrate_option_menu), 8);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1308 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1309 case 96:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1310 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1311 (bitrate_option_menu), 9);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1312 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1313 case 112:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1314 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1315 (bitrate_option_menu), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1316 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1317 case 128:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1318 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1319 (bitrate_option_menu), 11);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1320 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1321 case 160:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1322 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1323 (bitrate_option_menu), 12);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1324 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1325 case 192:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1326 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1327 (bitrate_option_menu), 13);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1328 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1329 case 224:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1330 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1331 (bitrate_option_menu), 14);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1332 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1333 case 256:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1334 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1335 (bitrate_option_menu), 15);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1336 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1337 case 320:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1338 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1339 (bitrate_option_menu), 16);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1340 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1341
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1342 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1343
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1344 // hbox2 for compression ratio
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1345 hbox2 = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1346 gtk_container_add(GTK_CONTAINER(enc_quality_vbox), hbox2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1347
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1348 // radio 2
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1349 enc_radio2 = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(enc_radio1));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1350 if (enc_toggle_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1351 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enc_radio2),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1352 TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1353 // pack radio 2
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1354 gtk_box_pack_start(GTK_BOX(hbox2), enc_radio2, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1355
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1356 // label
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1357 enc_quality_label2 = gtk_label_new("Compression ratio:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1358 gtk_box_pack_start(GTK_BOX(hbox2), enc_quality_label2, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1359
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1360 // comp-ratio spin
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1361 compression_adj = gtk_adjustment_new(11, 0, 100, 1, 1, 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1362 compression_spin =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1363 gtk_spin_button_new(GTK_ADJUSTMENT(compression_adj), 8, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1364 gtk_widget_set_usize(compression_spin, 40, 28);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1365 gtk_container_add(GTK_CONTAINER(hbox2), compression_spin);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1366 gtk_box_pack_end(GTK_BOX(hbox2), compression_spin, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1367
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1368 gtk_signal_connect(GTK_OBJECT(compression_adj), "value-changed",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1369 GTK_SIGNAL_FUNC(compression_change), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1370
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1371 gtk_spin_button_set_value(GTK_SPIN_BUTTON(compression_spin),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1372 compression_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1373
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1374 // radio button signale connect
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1375 gtk_signal_connect(GTK_OBJECT(enc_radio1), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1376 GTK_SIGNAL_FUNC(encoding_toggle),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1377 GINT_TO_POINTER(0));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1378 gtk_signal_connect(GTK_OBJECT(enc_radio2), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1379 GTK_SIGNAL_FUNC(encoding_toggle),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1380 GINT_TO_POINTER(1));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1381
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1382 /* end of yaz new code */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1383
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1384
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1385 /* Audio Mode */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1386
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1387 mode_frame = gtk_frame_new("Audio Mode:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1388 gtk_container_set_border_width(GTK_CONTAINER(mode_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1389 gtk_box_pack_start(GTK_BOX(quality_vbox), mode_frame, FALSE, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1390 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1391
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1392 mode_hbox = gtk_hbox_new(TRUE, 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1393 gtk_container_set_border_width(GTK_CONTAINER(mode_hbox), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1394 gtk_container_add(GTK_CONTAINER(mode_frame), mode_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1395 mode_option_menu = gtk_option_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1396 mode_menu = gtk_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1397 mode_menu_item = gtk_menu_item_new_with_label("Auto");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1398 gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1399 GTK_SIGNAL_FUNC(mode_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1400 GINT_TO_POINTER(4));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1401 gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1402 mode_menu_item = gtk_menu_item_new_with_label("Joint-Stereo");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1403 gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1404 GTK_SIGNAL_FUNC(mode_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1405 GINT_TO_POINTER(1));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1406 gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1407 mode_menu_item = gtk_menu_item_new_with_label("Stereo");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1408 gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1409 GTK_SIGNAL_FUNC(mode_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1410 GINT_TO_POINTER(0));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1411 gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1412 mode_menu_item = gtk_menu_item_new_with_label("Mono");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1413 gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1414 GTK_SIGNAL_FUNC(mode_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1415 GINT_TO_POINTER(3));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1416 gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1417 gtk_option_menu_set_menu(GTK_OPTION_MENU(mode_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1418 mode_menu);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1419 gtk_widget_set_usize(mode_option_menu, 50, 28);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1420 gtk_box_pack_start(GTK_BOX(mode_hbox), mode_option_menu, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1421 TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1422
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1423 switch (audio_mode_val) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1424
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1425 case 4:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1426 gtk_option_menu_set_history(GTK_OPTION_MENU(mode_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1427 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1428 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1429 case 1:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1430 gtk_option_menu_set_history(GTK_OPTION_MENU(mode_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1431 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1432 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1433 case 0:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1434 gtk_option_menu_set_history(GTK_OPTION_MENU(mode_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1435 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1436 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1437 case 3:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1438 gtk_option_menu_set_history(GTK_OPTION_MENU(mode_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1439 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1440 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1441 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1442
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1443 ms_mode_toggle = gtk_check_button_new_with_label("auto-M/S mode");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1444 gtk_box_pack_start(GTK_BOX(mode_hbox), ms_mode_toggle, TRUE, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1445 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1446 gtk_signal_connect(GTK_OBJECT(ms_mode_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1447 GTK_SIGNAL_FUNC(toggle_auto_ms), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1448
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1449 if (auto_ms_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1450 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ms_mode_toggle),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1451 TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1452
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1453 /* Misc */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1454
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1455 misc_frame = gtk_frame_new("Misc:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1456 gtk_container_set_border_width(GTK_CONTAINER(misc_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1457 gtk_box_pack_start(GTK_BOX(quality_vbox), misc_frame, FALSE, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1458 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1459
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1460 misc_vbox = gtk_vbox_new(TRUE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1461 gtk_container_set_border_width(GTK_CONTAINER(misc_vbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1462 gtk_container_add(GTK_CONTAINER(misc_frame), misc_vbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1463
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1464 enforce_iso_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1465 gtk_check_button_new_with_label
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1466 ("Enforce strict ISO complience");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1467 gtk_box_pack_start(GTK_BOX(misc_vbox), enforce_iso_toggle, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1468 TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1469 gtk_signal_connect(GTK_OBJECT(enforce_iso_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1470 GTK_SIGNAL_FUNC(toggle_enforce_iso), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1471
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1472 if (enforce_iso_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1473 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1474 (enforce_iso_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1475
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1476 error_protection_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1477 gtk_check_button_new_with_label("Error protection");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1478 gtk_box_pack_start(GTK_BOX(misc_vbox), error_protection_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1479 TRUE, TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1480 gtk_signal_connect(GTK_OBJECT(error_protection_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1481 GTK_SIGNAL_FUNC(toggle_error_protect), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1482
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1483 if (error_protect_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1484 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1485 (error_protection_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1486
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1487 gtk_tooltips_set_tip(GTK_TOOLTIPS(quality_tips),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1488 error_protection_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1489 "Adds 16 bit checksum to every frame", "");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1490
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1491
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1492 /* Add the Notebook */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1493 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), quality_vbox,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1494 gtk_label_new("Quality"));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1495
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1496
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1497 /* VBR/ABR */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1498
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1499 vbr_vbox = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1500 gtk_container_set_border_width(GTK_CONTAINER(vbr_vbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1501
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1502 vbr_tips = gtk_tooltips_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1503
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1504 /* Toggle VBR */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1505
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1506 vbr_toggle = gtk_check_button_new_with_label("Enable VBR/ABR");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1507 gtk_widget_set_usize(vbr_toggle, 60, 30);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1508 gtk_box_pack_start(GTK_BOX(vbr_vbox), vbr_toggle, FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1509 gtk_signal_connect(GTK_OBJECT(vbr_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1510 GTK_SIGNAL_FUNC(toggle_vbr), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1511
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1512 vbr_options_vbox = gtk_vbox_new(FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1513 gtk_container_add(GTK_CONTAINER(vbr_vbox), vbr_options_vbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1514 gtk_widget_set_sensitive(vbr_options_vbox, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1515
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1516 /* Choose VBR/ABR */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1517
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1518 vbr_type_frame = gtk_frame_new("Type:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1519 gtk_container_set_border_width(GTK_CONTAINER(vbr_type_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1520 gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_type_frame,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1521 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1522
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1523 vbr_type_hbox = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1524 gtk_container_set_border_width(GTK_CONTAINER(vbr_type_hbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1525 gtk_container_add(GTK_CONTAINER(vbr_type_frame), vbr_type_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1526
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1527 vbr_type_radio1 = gtk_radio_button_new_with_label(NULL, "VBR");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1528 gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), vbr_type_radio1,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1529 "Variable bitrate", "");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1530 gtk_box_pack_start(GTK_BOX(vbr_type_hbox), vbr_type_radio1, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1531 TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1532 if (vbr_type == 0)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1533 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1534 (vbr_type_radio1), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1535
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1536 vbr_type_radio2 =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1537 gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1538 (vbr_type_radio1),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1539 "ABR");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1540 gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), vbr_type_radio2,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1541 "Average bitrate", "");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1542 gtk_box_pack_start(GTK_BOX(vbr_type_hbox), vbr_type_radio2, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1543 TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1544 if (vbr_type == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1545 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1546 (vbr_type_radio2), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1547
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1548 gtk_signal_connect(GTK_OBJECT(vbr_type_radio1), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1549 GTK_SIGNAL_FUNC(vbr_abr_toggle), "VBR");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1550 gtk_signal_connect(GTK_OBJECT(vbr_type_radio2), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1551 GTK_SIGNAL_FUNC(vbr_abr_toggle), "ABR");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1552
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1553 /* VBR Options */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1554
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1555 vbr_frame = gtk_frame_new("VBR Options:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1556 gtk_container_set_border_width(GTK_CONTAINER(vbr_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1557 gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_frame, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1558 FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1559
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1560 vbr_options_vbox2 = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1561 gtk_container_set_border_width(GTK_CONTAINER(vbr_options_vbox2),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1562 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1563 gtk_container_add(GTK_CONTAINER(vbr_frame), vbr_options_vbox2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1564
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1565 vbr_options_hbox1 = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1566 gtk_container_set_border_width(GTK_CONTAINER(vbr_options_hbox1),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1567 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1568 gtk_container_add(GTK_CONTAINER(vbr_options_vbox2),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1569 vbr_options_hbox1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1570
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1571 vbr_min_label = gtk_label_new("Minimum bitrate (kbps):");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1572 gtk_misc_set_alignment(GTK_MISC(vbr_min_label), 0, 0.5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1573 gtk_box_pack_start(GTK_BOX(vbr_options_hbox1), vbr_min_label, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1574 TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1575
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1576 vbr_min_option_menu = gtk_option_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1577 vbr_min_menu = gtk_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1578 vbr_min_menu_item = gtk_menu_item_new_with_label("8");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1579 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1580 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1581 GINT_TO_POINTER(8));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1582 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1583 vbr_min_menu_item = gtk_menu_item_new_with_label("16");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1584 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1585 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1586 GINT_TO_POINTER(16));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1587 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1588 vbr_min_menu_item = gtk_menu_item_new_with_label("24");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1589 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1590 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1591 GINT_TO_POINTER(24));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1592 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1593 vbr_min_menu_item = gtk_menu_item_new_with_label("32");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1594 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1595 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1596 GINT_TO_POINTER(32));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1597 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1598 vbr_min_menu_item = gtk_menu_item_new_with_label("40");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1599 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1600 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1601 GINT_TO_POINTER(40));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1602 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1603 vbr_min_menu_item = gtk_menu_item_new_with_label("48");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1604 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1605 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1606 GINT_TO_POINTER(48));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1607 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1608 vbr_min_menu_item = gtk_menu_item_new_with_label("56");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1609 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1610 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1611 GINT_TO_POINTER(56));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1612 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1613 vbr_min_menu_item = gtk_menu_item_new_with_label("64");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1614 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1615 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1616 GINT_TO_POINTER(64));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1617 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1618 vbr_min_menu_item = gtk_menu_item_new_with_label("80");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1619 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1620 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1621 GINT_TO_POINTER(80));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1622 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1623 vbr_min_menu_item = gtk_menu_item_new_with_label("96");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1624 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1625 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1626 GINT_TO_POINTER(96));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1627 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1628 vbr_min_menu_item = gtk_menu_item_new_with_label("112");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1629 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1630 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1631 GINT_TO_POINTER(112));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1632 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1633 vbr_min_menu_item = gtk_menu_item_new_with_label("128");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1634 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1635 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1636 GINT_TO_POINTER(128));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1637 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1638 vbr_min_menu_item = gtk_menu_item_new_with_label("160");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1639 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1640 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1641 GINT_TO_POINTER(160));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1642 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1643 vbr_min_menu_item = gtk_menu_item_new_with_label("192");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1644 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1645 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1646 GINT_TO_POINTER(192));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1647 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1648 vbr_min_menu_item = gtk_menu_item_new_with_label("224");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1649 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1650 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1651 GINT_TO_POINTER(224));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1652 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1653 vbr_min_menu_item = gtk_menu_item_new_with_label("256");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1654 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1655 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1656 GINT_TO_POINTER(256));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1657 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1658 vbr_min_menu_item = gtk_menu_item_new_with_label("320");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1659 gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1660 GTK_SIGNAL_FUNC(vbr_min_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1661 GINT_TO_POINTER(320));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1662 gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1663 gtk_option_menu_set_menu(GTK_OPTION_MENU(vbr_min_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1664 vbr_min_menu);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1665 gtk_widget_set_usize(vbr_min_option_menu, 40, 25);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1666 gtk_box_pack_start(GTK_BOX(vbr_options_hbox1), vbr_min_option_menu,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1667 TRUE, TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1668
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1669 switch (vbr_min_val) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1670
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1671 case 8:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1672 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1673 (vbr_min_option_menu), 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1674 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1675 case 16:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1676 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1677 (vbr_min_option_menu), 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1678 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1679 case 24:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1680 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1681 (vbr_min_option_menu), 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1682 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1683 case 32:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1684 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1685 (vbr_min_option_menu), 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1686 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1687 case 40:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1688 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1689 (vbr_min_option_menu), 4);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1690 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1691 case 48:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1692 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1693 (vbr_min_option_menu), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1694 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1695 case 56:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1696 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1697 (vbr_min_option_menu), 6);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1698 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1699 case 64:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1700 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1701 (vbr_min_option_menu), 7);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1702 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1703 case 80:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1704 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1705 (vbr_min_option_menu), 8);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1706 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1707 case 96:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1708 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1709 (vbr_min_option_menu), 9);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1710 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1711 case 112:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1712 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1713 (vbr_min_option_menu), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1714 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1715 case 128:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1716 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1717 (vbr_min_option_menu), 11);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1718 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1719 case 160:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1720 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1721 (vbr_min_option_menu), 12);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1722 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1723 case 192:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1724 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1725 (vbr_min_option_menu), 13);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1726 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1727 case 224:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1728 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1729 (vbr_min_option_menu), 14);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1730 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1731 case 256:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1732 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1733 (vbr_min_option_menu), 15);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1734 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1735 case 320:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1736 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1737 (vbr_min_option_menu), 16);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1738 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1739
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1740 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1741
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1742 vbr_options_hbox2 = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1743 gtk_container_set_border_width(GTK_CONTAINER(vbr_options_hbox2),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1744 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1745 gtk_container_add(GTK_CONTAINER(vbr_options_vbox2),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1746 vbr_options_hbox2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1747
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1748 vbr_max_label = gtk_label_new("Maximum bitrate (kbps):");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1749 gtk_misc_set_alignment(GTK_MISC(vbr_max_label), 0, 0.5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1750 gtk_box_pack_start(GTK_BOX(vbr_options_hbox2), vbr_max_label, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1751 TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1752
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1753 vbr_max_option_menu = gtk_option_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1754 vbr_max_menu = gtk_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1755 vbr_max_menu_item = gtk_menu_item_new_with_label("8");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1756 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1757 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1758 GINT_TO_POINTER(8));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1759 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1760 vbr_max_menu_item = gtk_menu_item_new_with_label("16");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1761 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1762 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1763 GINT_TO_POINTER(16));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1764 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1765 vbr_max_menu_item = gtk_menu_item_new_with_label("24");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1766 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1767 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1768 GINT_TO_POINTER(24));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1769 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1770 vbr_max_menu_item = gtk_menu_item_new_with_label("32");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1771 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1772 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1773 GINT_TO_POINTER(32));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1774 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1775 vbr_max_menu_item = gtk_menu_item_new_with_label("40");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1776 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1777 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1778 GINT_TO_POINTER(40));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1779 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1780 vbr_max_menu_item = gtk_menu_item_new_with_label("48");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1781 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1782 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1783 GINT_TO_POINTER(48));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1784 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1785 vbr_max_menu_item = gtk_menu_item_new_with_label("56");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1786 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1787 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1788 GINT_TO_POINTER(56));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1789 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1790 vbr_max_menu_item = gtk_menu_item_new_with_label("64");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1791 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1792 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1793 GINT_TO_POINTER(64));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1794 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1795 vbr_max_menu_item = gtk_menu_item_new_with_label("80");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1796 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1797 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1798 GINT_TO_POINTER(80));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1799 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1800 vbr_max_menu_item = gtk_menu_item_new_with_label("96");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1801 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1802 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1803 GINT_TO_POINTER(96));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1804 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1805 vbr_max_menu_item = gtk_menu_item_new_with_label("112");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1806 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1807 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1808 GINT_TO_POINTER(112));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1809 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1810 vbr_max_menu_item = gtk_menu_item_new_with_label("128");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1811 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1812 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1813 GINT_TO_POINTER(128));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1814 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1815 vbr_max_menu_item = gtk_menu_item_new_with_label("160");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1816 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1817 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1818 GINT_TO_POINTER(160));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1819 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1820 vbr_max_menu_item = gtk_menu_item_new_with_label("192");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1821 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1822 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1823 GINT_TO_POINTER(192));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1824 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1825 vbr_max_menu_item = gtk_menu_item_new_with_label("224");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1826 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1827 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1828 GINT_TO_POINTER(224));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1829 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1830 vbr_max_menu_item = gtk_menu_item_new_with_label("256");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1831 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1832 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1833 GINT_TO_POINTER(256));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1834 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1835 vbr_max_menu_item = gtk_menu_item_new_with_label("320");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1836 gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1837 GTK_SIGNAL_FUNC(vbr_max_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1838 GINT_TO_POINTER(320));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1839 gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1840 gtk_option_menu_set_menu(GTK_OPTION_MENU(vbr_max_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1841 vbr_max_menu);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1842 gtk_widget_set_usize(vbr_max_option_menu, 40, 25);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1843 gtk_box_pack_start(GTK_BOX(vbr_options_hbox2), vbr_max_option_menu,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1844 TRUE, TRUE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1845
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1846 switch (vbr_max_val) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1847
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1848 case 8:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1849 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1850 (vbr_max_option_menu), 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1851 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1852 case 16:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1853 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1854 (vbr_max_option_menu), 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1855 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1856 case 24:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1857 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1858 (vbr_max_option_menu), 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1859 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1860 case 32:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1861 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1862 (vbr_max_option_menu), 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1863 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1864 case 40:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1865 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1866 (vbr_max_option_menu), 4);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1867 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1868 case 48:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1869 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1870 (vbr_max_option_menu), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1871 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1872 case 56:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1873 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1874 (vbr_max_option_menu), 6);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1875 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1876 case 64:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1877 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1878 (vbr_max_option_menu), 7);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1879 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1880 case 80:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1881 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1882 (vbr_max_option_menu), 8);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1883 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1884 case 96:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1885 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1886 (vbr_max_option_menu), 9);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1887 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1888 case 112:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1889 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1890 (vbr_max_option_menu), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1891 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1892 case 128:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1893 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1894 (vbr_max_option_menu), 11);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1895 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1896 case 160:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1897 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1898 (vbr_max_option_menu), 12);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1899 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1900 case 192:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1901 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1902 (vbr_max_option_menu), 13);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1903 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1904 case 224:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1905 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1906 (vbr_max_option_menu), 14);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1907 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1908 case 256:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1909 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1910 (vbr_max_option_menu), 15);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1911 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1912 case 320:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1913 gtk_option_menu_set_history(GTK_OPTION_MENU
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1914 (vbr_max_option_menu), 16);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1915 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1916
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1917 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1918
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1919 enforce_min_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1920 gtk_check_button_new_with_label
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1921 ("Strictly enforce minimum bitrate");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1922 gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), enforce_min_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1923 "For use with players that do not support low bitrate mp3 (Apex AD600-A DVD/mp3 player)",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1924 "");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1925 gtk_box_pack_start(GTK_BOX(vbr_options_vbox2), enforce_min_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1926 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1927 gtk_signal_connect(GTK_OBJECT(enforce_min_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1928 GTK_SIGNAL_FUNC(toggle_enforce_min), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1929
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1930 if (enforce_min_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1931 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1932 (enforce_min_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1933
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1934 /* ABR Options */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1935
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1936 abr_frame = gtk_frame_new("ABR Options:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1937 gtk_container_set_border_width(GTK_CONTAINER(abr_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1938 gtk_box_pack_start(GTK_BOX(vbr_options_vbox), abr_frame, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1939 FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1940 gtk_widget_set_sensitive(abr_frame, FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1941
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1942 abr_hbox = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1943 gtk_container_set_border_width(GTK_CONTAINER(abr_hbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1944 gtk_container_add(GTK_CONTAINER(abr_frame), abr_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1945
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1946 abr_label = gtk_label_new("Average bitrate (kbps):");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1947 gtk_misc_set_alignment(GTK_MISC(abr_label), 0, 0.5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1948 gtk_box_pack_start(GTK_BOX(abr_hbox), abr_label, TRUE, TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1949
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1950 abr_option_menu = gtk_option_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1951 abr_menu = gtk_menu_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1952 abr_menu_item = gtk_menu_item_new_with_label("8");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1953 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1954 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1955 GINT_TO_POINTER(8));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1956 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1957 abr_menu_item = gtk_menu_item_new_with_label("16");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1958 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1959 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1960 GINT_TO_POINTER(16));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1961 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1962 abr_menu_item = gtk_menu_item_new_with_label("24");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1963 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1964 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1965 GINT_TO_POINTER(24));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1966 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1967 abr_menu_item = gtk_menu_item_new_with_label("32");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1968 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1969 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1970 GINT_TO_POINTER(32));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1971 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1972 abr_menu_item = gtk_menu_item_new_with_label("40");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1973 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1974 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1975 GINT_TO_POINTER(40));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1976 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1977 abr_menu_item = gtk_menu_item_new_with_label("48");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1978 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1979 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1980 GINT_TO_POINTER(48));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1981 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1982 abr_menu_item = gtk_menu_item_new_with_label("56");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1983 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1984 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1985 GINT_TO_POINTER(56));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1986 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1987 abr_menu_item = gtk_menu_item_new_with_label("64");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1988 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1989 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1990 GINT_TO_POINTER(64));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1991 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1992 abr_menu_item = gtk_menu_item_new_with_label("80");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1993 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1994 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1995 GINT_TO_POINTER(80));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1996 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1997 abr_menu_item = gtk_menu_item_new_with_label("96");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1998 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
1999 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2000 GINT_TO_POINTER(96));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2001 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2002 abr_menu_item = gtk_menu_item_new_with_label("112");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2003 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2004 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2005 GINT_TO_POINTER(112));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2006 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2007 abr_menu_item = gtk_menu_item_new_with_label("128");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2008 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2009 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2010 GINT_TO_POINTER(128));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2011 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2012 abr_menu_item = gtk_menu_item_new_with_label("160");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2013 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2014 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2015 GINT_TO_POINTER(160));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2016 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2017 abr_menu_item = gtk_menu_item_new_with_label("192");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2018 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2019 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2020 GINT_TO_POINTER(192));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2021 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2022 abr_menu_item = gtk_menu_item_new_with_label("224");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2023 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2024 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2025 GINT_TO_POINTER(224));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2026 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2027 abr_menu_item = gtk_menu_item_new_with_label("256");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2028 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2029 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2030 GINT_TO_POINTER(256));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2031 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2032 abr_menu_item = gtk_menu_item_new_with_label("320");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2033 gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2034 GTK_SIGNAL_FUNC(abr_activate),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2035 GINT_TO_POINTER(320));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2036 gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2037 gtk_option_menu_set_menu(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2038 abr_menu);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2039 gtk_widget_set_usize(abr_option_menu, 40, 25);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2040 gtk_box_pack_start(GTK_BOX(abr_hbox), abr_option_menu, TRUE, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2041 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2042
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2043 switch (abr_val) {
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2044
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2045 case 8:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2046 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2047 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2048 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2049 case 16:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2050 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2051 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2052 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2053 case 24:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2054 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2055 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2056 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2057 case 32:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2058 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2059 3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2060 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2061 case 40:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2062 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2063 4);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2064 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2065 case 48:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2066 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2067 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2068 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2069 case 56:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2070 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2071 6);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2072 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2073 case 64:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2074 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2075 7);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2076 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2077 case 80:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2078 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2079 8);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2080 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2081 case 96:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2082 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2083 9);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2084 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2085 case 112:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2086 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2087 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2088 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2089 case 128:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2090 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2091 11);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2092 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2093 case 160:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2094 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2095 12);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2096 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2097 case 192:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2098 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2099 13);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2100 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2101 case 224:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2102 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2103 14);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2104 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2105 case 256:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2106 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2107 15);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2108 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2109 case 320:
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2110 gtk_option_menu_set_history(GTK_OPTION_MENU(abr_option_menu),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2111 16);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2112 break;
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2113
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2114 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2115
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2116 /* Quality Level */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2117
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2118 vbr_options_hbox3 = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2119 gtk_container_set_border_width(GTK_CONTAINER(vbr_options_hbox3),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2120 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2121 gtk_container_add(GTK_CONTAINER(vbr_options_vbox),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2122 vbr_options_hbox3);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2123
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2124 vbr_quality_label = gtk_label_new("VBR quality level:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2125 gtk_misc_set_alignment(GTK_MISC(vbr_quality_label), 0, 0.5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2126 gtk_box_pack_start(GTK_BOX(vbr_options_hbox3), vbr_quality_label,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2127 TRUE, TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2128
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2129 vbr_quality_adj = gtk_adjustment_new(4, 0, 9, 1, 1, 1);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2130 vbr_quality_spin =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2131 gtk_spin_button_new(GTK_ADJUSTMENT(vbr_quality_adj), 8, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2132 gtk_widget_set_usize(vbr_quality_spin, 20, 20);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2133 gtk_box_pack_start(GTK_BOX(vbr_options_hbox3), vbr_quality_spin,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2134 TRUE, TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2135 gtk_signal_connect(GTK_OBJECT(vbr_quality_adj), "value-changed",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2136 GTK_SIGNAL_FUNC(vbr_qual), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2137
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2138 gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), vbr_quality_spin,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2139 "highest:0;\nlowest:9;\ndefault:4;", "");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2140
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2141 gtk_spin_button_set_value(GTK_SPIN_BUTTON(vbr_quality_spin),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2142 vbr_quality_val);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2143
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2144 /* Xing Header */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2145
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2146 xing_header_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2147 gtk_check_button_new_with_label("Don't write Xing VBR header");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2148 gtk_box_pack_start(GTK_BOX(vbr_options_vbox), xing_header_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2149 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2150 gtk_signal_connect(GTK_OBJECT(xing_header_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2151 GTK_SIGNAL_FUNC(toggle_xing), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2152
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2153 if (toggle_xing_val == 0)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2154 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2155 (xing_header_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2156
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2157
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2158
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2159 /* Add the Notebook */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2160
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2161 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbr_vbox,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2162 gtk_label_new("VBR/ABR"));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2163
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2164
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2165 /* Tags */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2166
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2167 tags_vbox = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2168 gtk_container_set_border_width(GTK_CONTAINER(tags_vbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2169
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2170 tags_tips = gtk_tooltips_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2171
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2172 /* Frame Params */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2173
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2174 tags_frames_frame = gtk_frame_new("Frame params:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2175 gtk_container_set_border_width(GTK_CONTAINER(tags_frames_frame),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2176 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2177 gtk_box_pack_start(GTK_BOX(tags_vbox), tags_frames_frame, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2178 FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2179
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2180 tags_frames_hbox = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2181 gtk_container_set_border_width(GTK_CONTAINER(tags_frames_hbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2182 gtk_container_add(GTK_CONTAINER(tags_frames_frame),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2183 tags_frames_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2184
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2185 tags_copyright_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2186 gtk_check_button_new_with_label("Mark as copyright");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2187 gtk_box_pack_start(GTK_BOX(tags_frames_hbox),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2188 tags_copyright_toggle, FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2189 gtk_signal_connect(GTK_OBJECT(tags_copyright_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2190 GTK_SIGNAL_FUNC(toggle_copyright), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2191
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2192 if (mark_copyright_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2193 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2194 (tags_copyright_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2195
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2196 tags_original_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2197 gtk_check_button_new_with_label("Mark as original");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2198 gtk_box_pack_start(GTK_BOX(tags_frames_hbox), tags_original_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2199 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2200 gtk_signal_connect(GTK_OBJECT(tags_original_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2201 GTK_SIGNAL_FUNC(toggle_original), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2202
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2203 if (mark_original_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2204 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2205 (tags_original_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2206
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2207 /* ID3 Params */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2208
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2209 tags_id3_frame = gtk_frame_new("ID3 params:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2210 gtk_container_set_border_width(GTK_CONTAINER(tags_id3_frame), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2211 gtk_box_pack_start(GTK_BOX(tags_vbox), tags_id3_frame, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2212 FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2213
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2214 tags_id3_vbox = gtk_vbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2215 gtk_container_set_border_width(GTK_CONTAINER(tags_id3_vbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2216 gtk_container_add(GTK_CONTAINER(tags_id3_frame), tags_id3_vbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2217
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2218 tags_force_id3v2_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2219 gtk_check_button_new_with_label
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2220 ("Force addition of version 2 tag");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2221 gtk_box_pack_start(GTK_BOX(tags_id3_vbox), tags_force_id3v2_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2222 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2223 gtk_signal_connect(GTK_OBJECT(tags_force_id3v2_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2224 GTK_SIGNAL_FUNC(force_v2_toggle), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2225
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2226 tags_id3_hbox = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2227 gtk_container_add(GTK_CONTAINER(tags_id3_vbox), tags_id3_hbox);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2228
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2229 tags_only_v1_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2230 gtk_check_button_new_with_label("Only add v1 tag");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2231 gtk_box_pack_start(GTK_BOX(tags_id3_hbox), tags_only_v1_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2232 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2233 gtk_signal_connect(GTK_OBJECT(tags_only_v1_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2234 GTK_SIGNAL_FUNC(id3_only_version), "v1");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2235
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2236 tags_only_v2_toggle =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2237 gtk_check_button_new_with_label("Only add v2 tag");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2238 gtk_box_pack_start(GTK_BOX(tags_id3_hbox), tags_only_v2_toggle,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2239 FALSE, FALSE, 2);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2240 gtk_signal_connect(GTK_OBJECT(tags_only_v2_toggle), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2241 GTK_SIGNAL_FUNC(id3_only_version), "v2");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2242
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2243 if (force_v2_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2244 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2245 (tags_force_id3v2_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2246
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2247 if (only_v1_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2248 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2249 (tags_only_v1_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2250
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2251 if (only_v2_val == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2252 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2253 (tags_only_v2_toggle), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2254
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2255 /* Add the Notebook */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2256
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2257 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tags_vbox,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2258 gtk_label_new("Tags"));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2259
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2260
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2261 /* Path Config */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2262
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2263 path_hbox = gtk_hbox_new(FALSE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2264 gtk_container_set_border_width(GTK_CONTAINER(path_hbox), 10);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2265 gtk_box_pack_start(GTK_BOX(vbox), path_hbox, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2266
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2267 path_label = gtk_label_new("Path:");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2268 gtk_box_pack_start(GTK_BOX(path_hbox), path_label, FALSE, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2269 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2270 gtk_widget_show(path_label);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2271
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2272 path_dirbrowser =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2273 gtk_file_chooser_button_new("Pick a folder", GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2274 gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(path_dirbrowser), file_path);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2275 gtk_box_pack_start(GTK_BOX(path_hbox), path_dirbrowser, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2276
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2277 use_source_file_path =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2278 gtk_check_button_new_with_label("Use source file dir");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2279 gtk_box_pack_start(GTK_BOX(GTK_BOX(path_hbox)),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2280 use_source_file_path, TRUE, TRUE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2281 gtk_signal_connect(GTK_OBJECT(use_source_file_path), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2282 GTK_SIGNAL_FUNC(use_source_file_path_cb), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2283
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2284 if (b_use_source_file_path == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2285 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2286 (use_source_file_path), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2287
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2288 prepend_track_number =
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2289 gtk_check_button_new_with_label("Prepend track number to filename");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2290 gtk_box_pack_start(GTK_BOX(GTK_BOX(path_hbox)),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2291 prepend_track_number, TRUE, TRUE, 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2292 gtk_signal_connect(GTK_OBJECT(prepend_track_number), "toggled",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2293 GTK_SIGNAL_FUNC(prepend_track_number_cb), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2294
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2295 if (b_prepend_track_number == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2296 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2297 (prepend_track_number), TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2298
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2299
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2300 /* The Rest */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2301
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2302 /* Seperator */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2303
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2304 configure_separator = gtk_hseparator_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2305 gtk_box_pack_start(GTK_BOX(vbox), configure_separator, FALSE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2306 FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2307 gtk_widget_show(configure_separator);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2308
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2309 /* Buttons */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2310
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2311 configure_bbox = gtk_hbutton_box_new();
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2312 gtk_button_box_set_layout(GTK_BUTTON_BOX(configure_bbox),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2313 GTK_BUTTONBOX_END);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2314 gtk_button_box_set_spacing(GTK_BUTTON_BOX(configure_bbox), 5);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2315 gtk_box_pack_start(GTK_BOX(vbox), configure_bbox, FALSE, FALSE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2316
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2317 configure_ok = gtk_button_new_with_label("Ok");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2318 gtk_signal_connect(GTK_OBJECT(configure_ok), "clicked",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2319 GTK_SIGNAL_FUNC(configure_ok_cb), NULL);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2320 GTK_WIDGET_SET_FLAGS(configure_ok, GTK_CAN_DEFAULT);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2321 gtk_box_pack_start(GTK_BOX(configure_bbox), configure_ok, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2322 TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2323 gtk_widget_show(configure_ok);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2324 gtk_widget_grab_default(configure_ok);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2325
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2326 configure_cancel = gtk_button_new_with_label("Cancel");
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2327 gtk_signal_connect_object(GTK_OBJECT(configure_cancel), "clicked",
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2328 GTK_SIGNAL_FUNC(gtk_widget_destroy),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2329 GTK_OBJECT(configure_win));
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2330 GTK_WIDGET_SET_FLAGS(configure_cancel, GTK_CAN_DEFAULT);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2331 gtk_box_pack_start(GTK_BOX(configure_bbox), configure_cancel, TRUE,
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2332 TRUE, 0);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2333
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2334 /* Set States */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2335
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2336 if (vbr_on == 1)
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2337 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(vbr_toggle),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2338 TRUE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2339 else
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2340 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(vbr_toggle),
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2341 FALSE);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2342
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2343 /* Show it! */
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2344
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2345 gtk_widget_show_all(configure_win);
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2346
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2347 }
622c63a5c191 [svn] - add lame encoder plugin. not yet hooked up.
yaz
parents:
diff changeset
2348 }