153
153
#define BROWSE_CMD_BUF_MAX 16384
154
154
char buf[BROWSE_CMD_BUF_MAX];
156
#ifdef MACOSX_SUPPORT
157
157
/* On Macs the manual path is relative to the bundle. */
158
158
const char *boot_path;
159
159
boot_path = archdep_boot_path();
160
160
char *manual_path;
161
manual_path = util_concat(boot_path,"/../Resources/doc/vice_toc.html",NULL);
161
manual_path = util_concat(boot_path,"/../doc/vice_toc.html",NULL);
163
163
static const char manual_path[] = DOCDIR "/vice_toc.html";
310
310
/* quick snapshot, save ROMs & disks (??) */
311
log_debug(_("Quicksaving file %s."), (char *)data);
311
log_debug("Quicksaving file %s.", (char *)data);
312
312
if (machine_write_snapshot(data, 1, 1, 0) < 0) {
313
313
ui_error(_("Cannot write snapshot file\n`%s'\n"), data);
387
387
event_record_reset_milestone();
390
static UI_CALLBACK(sound_record)
390
static void sound_record_stop(void)
392
resources_set_string("SoundRecordDeviceName", "");
393
ui_display_statustext(_("Sound Recording stopped..."),10);
396
static void sound_record_start(char *format, char *extension)
392
398
ui_button_t button;
394
const char *devicename;
396
401
vsync_suspend_speed_eval();
398
resources_get_value("SoundRecordDeviceName",(void *) &devicename);
399
if (devicename && !strcmp(devicename,"wav")) {
400
/* the recording is active; stop it */
401
resources_set_value("SoundRecordDeviceName", "");
402
/* ui_display_statustext("");*/
404
s = ui_select_file(_("Record sound to file"), NULL, 0, False, NULL,
405
"*.wav", &button, False, NULL);
406
if (button == UI_BUTTON_OK && s != NULL) {
407
util_add_extension(&s, "wav");
408
resources_set_value("SoundRecordDeviceArg", s);
409
resources_set_value("SoundRecordDeviceName", "wav");
410
resources_set_value("Sound", (resource_value_t)1);
412
/* ui_display_statustext("Recording wav...");*/
403
resources_set_string("SoundRecordDeviceName", "");
404
s = ui_select_file(_("Record sound to file"), NULL, 0, False, NULL,
405
extension, &button, False, NULL);
406
if (button == UI_BUTTON_OK && s != NULL)
408
util_add_extension(&s, format);
409
resources_set_string("SoundRecordDeviceArg", s);
410
resources_set_string("SoundRecordDeviceName", format);
411
resources_set_int("Sound", 1);
413
ui_display_statustext(_("Sound Recording started..."),10);
417
static UI_CALLBACK(sound_record_wav)
419
sound_record_start("wav","*.wav");
422
static UI_CALLBACK(sound_record_voc)
424
sound_record_start("voc","*.voc");
427
static UI_CALLBACK(sound_record_iff)
429
sound_record_start("iff","*.iff");
432
static UI_CALLBACK(sound_record_aiff)
434
sound_record_start("aiff","*.aiff");
438
static UI_CALLBACK(sound_record_mp3)
440
sound_record_start("mp3","*.mp3");
417
444
/* ------------------------------------------------------------------------- */
419
446
static ui_menu_entry_t reset_submenu[] = {
504
531
ui_menu_entry_t ui_sound_record_commands_menu[] = {
505
{ N_("Sound record..."),
506
(ui_callback_t)sound_record, NULL, NULL,
507
XK_r, UI_HOTMOD_META },
532
{ N_("Sound record WAV..."),
533
(ui_callback_t)sound_record_wav, NULL, NULL },
534
{ N_("Sound record AIFF..."),
535
(ui_callback_t)sound_record_aiff, NULL, NULL },
536
{ N_("Sound record VOC..."),
537
(ui_callback_t)sound_record_voc, NULL, NULL },
538
{ N_("Sound record IFF..."),
539
(ui_callback_t)sound_record_iff, NULL, NULL },
541
{ N_("Sound record MP3..."),
542
(ui_callback_t)sound_record_mp3, NULL, NULL },
544
{ N_("Stop Sound record"),
545
(ui_callback_t)sound_record_stop, NULL, NULL },