annotate src/lame/out_lame.c @ 993:febbc2c05d33 trunk

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