⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globals.c

📁 speech signal process tools
💻 C
📖 第 1 页 / 共 2 页
字号:
/* Copyright (c) 1995 Entropic Research Laboratory, Inc. *//* * This material contains unpublished, proprietary software of  * Entropic Research Laboratory, Inc. Any reproduction, distribution,  * or publication of this work must be authorized in writing by Entropic  * Research Laboratory, Inc., and must bear the notice:  * *    "Copyright (c) 1987-1990  AT&T, Inc. *    "Copyright (c) 1986-1990  Entropic Speech, Inc.  *    "Copyright (c) 1990-1995  Entropic Research Laboratory, Inc.  *                   All rights reserved" * * The copyright notice above does not evidence any actual or intended  * publication of this source code.      * * Written by:   * Checked by: * Revised by:  Rodney Johnson, John Shore ERL * * globals.c * definition and initialization of globals used by waves, etc. */static char *sccs_id = "@(#)globals.c	1.33	10/30/96	ATT/ERL";#include <Objects.h>#include <esps/esps.h>#ifndef hpux#include <sys/param.h>#else#define MAXPATHLEN 1024#endifchar	*full_path();/*these should be changed to non-external defs*/extern int  use_dsp32;    /*def is in setrate.c and other independent progs*/extern int  debug_level;  /*def is in waves.c and other main progs*/extern int da_location;		/* def is in play_data.c */int da_stop_pos_view = 1; /* enables scrolling view to interrupted D/A position */int show_play_pos = 1; /* enables showing cursor playback position diring D/a */double play_time = 0.0;	/* tracks current playback time in seconds during D/A */double plot_max = 0;	       /* forced max and min for every trace */double  plot_min = 0;int append_extensions = 1; /* Add type-specific extensions to edited files? */int s_range_offset = 1;		/* match waves convention (0 to n-1) to ESPS */int c_range_offset = 0;	/* (for sample number and channel number, respectively) */int reticle_grid = 1;	  /* 1: internal grid marks in reticles; 0: none */int show_processes = 1;		/* enable external-process monitoring GUI */int show_error_gui = 1;		/* enable error messages in GUI box */int major_lines = 0;	  /* 1: draw lines across plot on reticle; 0: none */int do_central_marks = 1;  /* 1: draw central marks on spectrograms; 0: no */int spect_height = 0;int spect_width = 0;int sig_max_override = 0; /* deliberate override of sig-specific maxmin for D/A scale *//* added for FBI */int spect_interp = 1;	  /* 1: interpolate spectrograms; 0: "rectangles" */int h_spect_rescale = 0;  /* 1: rescale spectrograms horizontally; 0: don't */int v_spect_rescale = 0;  /* 1: rescale spectrograms vertically; 0: don't */char spect_rescale_scope[50] = "view"; /* on resize, rescale view or buffer? */int shorten_header = 0;  /* put only the signal's basename in window frame if true */int dsp_type;		/* type of DSP board */int P8574_type=0;	/* 1 = P8574, 0 = P8574A */int ARIEL_16=0;		/* 16 Mhz crystal on Ariel/surf card, else 24Mhz */int ARIEL_HK=0;		/* Ariel Pro Port on Heurikon vme board */int socket_port=DEFAULT_PORT;	/* socket for server mode */int hold_audio_port=0;	/* for sparc only, if non-zero, then hold audio port 	        open once it has been opened.  This eliminates the clicking. */int old_sphere_format=0; /* in older sphere files, the "sample_count" field			    means total samples, NOT samples per channel (or			    records).  If this is non-zero, then the old			    format is used.  If zero, then current rule is			    used, which is that sample_count means samples			    per channel (like esps).  For example, the			    1992 Credit Card CD is old format, but the sample			    files in the current NIST source directory are			    in current format */int play_buff_factor = 0;   /* if non-zero then factor to increase play			       buffer size *//* some Ariel boards have the wrong type of P8574.  They should be P8574,   some are P8574A.  This changes the serial address involved with   communication between the Surfboard and the Ariel card.    */extern double   image_clip, image_range;				/* used by dither() in spect.c */int 		dsp32_wait = 5;	/* how long to try for board access-- */				/* used by setup_dsp() in spect.c, */int   min_frameheight = 100;	/* spgm height - in xspect.c and spect.c */int   min_framewidth  = 350;   /* spgm width - in xspect.c and spect.c *//* THE FOLLOWING GLOBALS MAY BE SET FROM <a profile file> */int  command_step = 0 ; /* 0->no step; 1->step through commands */char inputname[MAXPATHLEN] = "",	/* name of signal input file */     outputname[MAXPATHLEN] = "",	/* name of signal output file */     objectname[100] = "",	/* user-defined object name */     commandname[MAXPATHLEN] = "",	/* command name */     init_file[MAXPATHLEN] = "$ESPS_BASE/lib/waves/commands/xw_init.WC", 					/* control script for initialization */     overlayname[MAXPATHLEN] = "",     /* file to be overlaid on a spectrogram */     funcname[MAXPATHLEN] = "",	/* linkage to external process */     active_ids[1000] = "",	/* names and numbers of channels to */     active_numbers[1000] = "",	/* be displayed (all, if these are blank) */     wb_spect_params[MAXPATHLEN] = "wb_params",     nb_spect_params[MAXPATHLEN] = "nb_params",     def_cm[MAXPATHLEN] = "$ESPS_BASE/lib/waves/colormaps/TImap",     def_left_op[50] = "up/down move",     def_blowup_op[50] = "xmarks",     def_move_op[50] = "",     def_middle_op[50] = "play between marks",     def_smiddle_op[50] = "modify intensity",     def_sleft_op[50] = "up/down move",     mark_reference[50] = "cursor_time",     time_range_prefix[MAXPATHLEN] = "-r",     samp_range_prefix[MAXPATHLEN] = "-r",     attachments[MES_BUF_SIZE] = "xspectrum xlabel",				/* attachments to make panel buttons for */     ens_print_atts[MES_BUF_SIZE] = "xspectrum xlabel",				/* attachments that support ensemble printing */     f0_plot_specs[50] = "",	/* plotting style, char., and offsets for F0 */     sgram_program[MAXPATHLEN] = "sgram", /* name of spectrogram program to call 				     if the dsp32 board isn't present 				     (i.e., if use_dsp32==0)*/        remote_path[MAXPATHLEN] = "",                                       /*if defined, prefixed to basename of all 				    file names in external calls,				    unless overriden by remote_input_path				    or remote_output_path; useful				    for NFS access and rsh*/     remote_input_path[MAXPATHLEN] = "",                                      /*if defined, prefixed to basename of all 				    output file names in external calls; useful				    for NFS access and rsh*/     remote_output_path[MAXPATHLEN] = "",                                    /*if defined, prefixed to basename of all 				    output file names in external calls; useful				    for NFS access and rsh*/     temp_path[MAXPATHLEN] = ".",     /*directory path to place where esps temp				  files can be put*/     output_dir[MAXPATHLEN] = "",  /*directory for all output files; if 				     strlen(output_dir) == 0, output files				     go in current directory of same				     directory as input file */     play_program[MAXPATHLEN] = ""; /*name of D/A program to call when DSP32				   board not there (use_dsp32==0)*//* globals for Xprinter control */int print_graphic_printer = 1; /* 1 for printer, 0 for file */int print_graphic_resolution = 300;char print_graphic_orientation[25]="Portrait"; /* or Landscape */char print_graphic_type[25] = "PostScript";    /* or PCL */char print_graphic_file[MAXPATHLEN] = "waves.prt";char print_graphic_command[MAXPATHLEN] = "lpr";double print_graphic_scale = 1.0;int print_only_plot = 0;int print_ps_level = 2;  /* level 1 PS results in BW spectrograms *//* file containing a header for headerless files */extern char default_header[];	/* in copheader.c *//*flag indicating that single channel, non-complex, FEA_SD filesshould be read in as shorts and treated as traditional waves SD*/extern int fea_sd_special; /*in header.c*/int    write_common = 0;  /* should moving markers write ESPS common?*/int scroll_ganged = 1,    zoom_ganged = 0,    edit_ganged = 0,    line_type = 1,		/* for plotting waveforms  */    ctlwin_x = 0,    ctlwin_y = 0,    ctlwin_iconized = 0,    options = REPAINT_ON_RELEASE | DONT_SAVE_SPGM | SAVE_AFTER_EDIT;/* These break out the semantics of (and replace) the "options" variable. */int dont_save_sgrams = TRUE,  overlay_as_number = FALSE,  redraw_on_release = TRUE,  rewrite_after_edit = TRUE;/* some display creation globals */double ref_size = 4.0;		/* size for def. waveform disp.*/double ref_step = 3.0;		/* amount to step in file */double ref_start = 0.0;		/* where reference window display begins */double zoom_ratio = .5;double cross_level = 0.0;	/* level for crossing-cursor positioning */int def_w_height = 300,		/* dim. of waveform window */    def_w_width = 1100,    scrollbar_height = 20,    readout_bar_height = 20;	/* XView only */extern int    max_cmap_size; /* in xcolormap.c */int invert_dither = 0;		/* dithered spectrograms in inverse video?				   XView only (xspect.c) *//* window position parameters */int  next_x = 10,		/* upper left-hand corner of new window */     next_y = 120;int  w_x_incr=10,		/* increment for next window */     w_y_incr=20;/* variables used by xf0_methods.c */double  f0_canvas_use = .75, f0_range = 300, f0_min = 60;int  w_verbose = 1; /*used mostly for feedback from command parsing*/int  show_labels = 1, show_vals = 1;int  show_current_chan = 0;int find_crossing = 0;		/* enable/disable level-crossing cursors */int max_buff_bytes = 2000000;	/* limit on size of signal data buffers */int use_static_cmap = 0;int stop_play_error = 1;    /* if 1 stop play on error, if 0				   then print message and continue */				/* 1 is traditional waves action */  /* END OF GLOBALS SET FROM CONFIGURATION FILE */Selector  g88 = {"play_buff_factor","%d", (char *)&play_buff_factor, NULL},  g87 = {"stop_play_error","%d", (char *)&stop_play_error, &g88},  g86 = {"old_sphere_format", "%d", (char *)&old_sphere_format, &g87},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -