Mercurial > audlegacy-plugins
comparison src/jack/jack.c @ 1369:6d87598ff8a9
Internationalization... (The first step of the "i18n" project could be ready for Audacious 1.4 release)
author | Stany HENRY <StrassBoy@gmail.com> |
---|---|
date | Wed, 25 Jul 2007 23:21:07 +0200 |
parents | e0956f08bfb7 |
children | 761e17b23e0c |
comparison
equal
deleted
inserted
replaced
1368:f611c44cc67b | 1369:6d87598ff8a9 |
---|---|
97 | 97 |
98 | 98 |
99 void jack_sample_rate_error(void) | 99 void jack_sample_rate_error(void) |
100 { | 100 { |
101 dialog = gtk_dialog_new(); | 101 dialog = gtk_dialog_new(); |
102 gtk_window_set_title(GTK_WINDOW(dialog), ("Sample rate mismatch")); | 102 gtk_window_set_title(GTK_WINDOW(dialog), _("Sample rate mismatch")); |
103 gtk_container_border_width(GTK_CONTAINER(dialog), 5); | 103 gtk_container_border_width(GTK_CONTAINER(dialog), 5); |
104 label = gtk_label_new(( | 104 label = gtk_label_new(_( |
105 "Xmms is asking for a sample rate that differs from\n " | 105 "Xmms is asking for a sample rate that differs from\n " |
106 "that of the jack server. Xmms 1.2.8 or later\n" | 106 "that of the jack server. Xmms 1.2.8 or later\n" |
107 "contains resampling routines that xmms-jack will\n" | 107 "contains resampling routines that xmms-jack will\n" |
108 "dynamically load and use to perform resampling.\n" | 108 "dynamically load and use to perform resampling.\n" |
109 "Or you can restart the jack server\n" | 109 "Or you can restart the jack server\n" |
113 "Chris Morgan <cmorgan@alum.wpi.edu>\n")); | 113 "Chris Morgan <cmorgan@alum.wpi.edu>\n")); |
114 | 114 |
115 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); | 115 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); |
116 gtk_widget_show(label); | 116 gtk_widget_show(label); |
117 | 117 |
118 button = gtk_button_new_with_label((" Close ")); | 118 button = gtk_button_new_with_label(_(" Close ")); |
119 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(dialog)); | 119 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(dialog)); |
120 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); | 120 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); |
121 gtk_widget_show(button); | 121 gtk_widget_show(button); |
122 | 122 |
123 gtk_widget_show(dialog); | 123 gtk_widget_show(dialog); |
140 /* Return the current number of milliseconds of audio data that has */ | 140 /* Return the current number of milliseconds of audio data that has */ |
141 /* been played out of the audio device, not including the buffer */ | 141 /* been played out of the audio device, not including the buffer */ |
142 gint jack_get_output_time(void) | 142 gint jack_get_output_time(void) |
143 { | 143 { |
144 gint return_val; | 144 gint return_val; |
145 | 145 |
146 /* don't try to get any values if the device is still closed */ | 146 /* don't try to get any values if the device is still closed */ |
147 if(JACK_GetState(driver) == CLOSED) | 147 if(JACK_GetState(driver) == CLOSED) |
148 return_val = 0; | 148 return_val = 0; |
149 else | 149 else |
150 return_val = JACK_GetPosition(driver, MILLISECONDS, PLAYED); /* get played position in terms of milliseconds */ | 150 return_val = JACK_GetPosition(driver, MILLISECONDS, PLAYED); /* get played position in terms of milliseconds */ |
180 | 180 |
181 void jack_set_port_connection_mode() | 181 void jack_set_port_connection_mode() |
182 { | 182 { |
183 /* setup the port connection mode that determines how bio2jack will connect ports */ | 183 /* setup the port connection mode that determines how bio2jack will connect ports */ |
184 enum JACK_PORT_CONNECTION_MODE mode; | 184 enum JACK_PORT_CONNECTION_MODE mode; |
185 | 185 |
186 if(strcmp(jack_cfg.port_connection_mode, "CONNECT_ALL") == 0) | 186 if(strcmp(jack_cfg.port_connection_mode, "CONNECT_ALL") == 0) |
187 mode = CONNECT_ALL; | 187 mode = CONNECT_ALL; |
188 else if(strcmp(jack_cfg.port_connection_mode, "CONNECT_OUTPUT") == 0) | 188 else if(strcmp(jack_cfg.port_connection_mode, "CONNECT_OUTPUT") == 0) |
189 mode = CONNECT_OUTPUT; | 189 mode = CONNECT_OUTPUT; |
190 else if(strcmp(jack_cfg.port_connection_mode, "CONNECT_NONE") == 0) | 190 else if(strcmp(jack_cfg.port_connection_mode, "CONNECT_NONE") == 0) |
458 new_channels != effect.channels) | 458 new_channels != effect.channels) |
459 { | 459 { |
460 TRACE("format changed, storing new values and opening/closing jack\n"); | 460 TRACE("format changed, storing new values and opening/closing jack\n"); |
461 TRACE("effect.format == %d, new_format == %d, effect.frequency == %ld, new_frequency == %d, effect.channels == %d, new_channels = %d\n", | 461 TRACE("effect.format == %d, new_format == %d, effect.frequency == %ld, new_frequency == %d, effect.channels == %d, new_channels = %d\n", |
462 effect.format, new_format, effect.frequency, new_frequency, effect.channels, new_channels); | 462 effect.format, new_format, effect.frequency, new_frequency, effect.channels, new_channels); |
463 | 463 |
464 positionMS = JACK_GetPosition(driver, MILLISECONDS, PLAYED); | 464 positionMS = JACK_GetPosition(driver, MILLISECONDS, PLAYED); |
465 | 465 |
466 jack_close(); | 466 jack_close(); |
467 jack_open(new_format, new_frequency, new_channels); | 467 jack_open(new_format, new_frequency, new_channels); |
468 | 468 |
469 /* restore the position after the open and close */ | 469 /* restore the position after the open and close */ |
470 JACK_SetState(driver, PAUSED); | 470 JACK_SetState(driver, PAUSED); |
471 JACK_SetPosition(driver, MILLISECONDS, positionMS); | 471 JACK_SetPosition(driver, MILLISECONDS, positionMS); |
472 JACK_SetState(driver, PLAYING); | 472 JACK_SetState(driver, PLAYING); |
473 } | 473 } |
589 | 589 |
590 | 590 |
591 void jack_about(void) | 591 void jack_about(void) |
592 { | 592 { |
593 static GtkWidget *aboutbox = NULL; | 593 static GtkWidget *aboutbox = NULL; |
594 | 594 |
595 if ( aboutbox == NULL ) | 595 if ( aboutbox == NULL ) |
596 { | 596 { |
597 aboutbox = xmms_show_message( | 597 aboutbox = xmms_show_message( |
598 _("About JACK Output Plugin 0.17"), | 598 _("About JACK Output Plugin 0.17"), |
599 _("XMMS jack Driver 0.17\n\n" | 599 _("XMMS jack Driver 0.17\n\n" |