Exemplo n.º 1
0
void
AudioProcessor::set_state(const AudioProcessorState *state)
{
  if (!state) return;

  // Channel order
  set_input_order(state->input_order);
  set_output_order(state->output_order);
  // Master gain
  set_master(state->master);
  // AGC
  set_auto_gain(state->auto_gain);
  set_normalize(state->normalize);
  set_attack(state->attack);
  set_release(state->release);
  // DRC
  set_drc(state->drc);
  set_drc_power(state->drc_power);
  // Matrix
  // (!) Auto matrix option must be set before setting the matrix
  // because when auto matrix is on, mixer rejects the new matrix.
  set_auto_matrix(state->auto_matrix);
  set_matrix(state->matrix);
  // Automatrix options
  set_normalize_matrix(state->normalize_matrix);
  set_voice_control(state->voice_control);
  set_expand_stereo(state->expand_stereo);
  // Automatrix levels
  set_clev(state->clev);
  set_slev(state->slev);
  set_lfelev(state->lfelev);
  // Input/output gains
  set_input_gains(state->input_gains);
  set_output_gains(state->output_gains);
  // SRC
  set_src_quality(state->src_quality);
  set_src_att(state->src_att);
  // Eqalizer
  set_eq(state->eq);
  if (state->eq_master_bands)
    set_eq_bands(CH_NONE, state->eq_master_bands, state->eq_master_nbands);
  for (int ch = 0; ch < CH_NAMES; ch++)
    if (state->eq_bands[ch])
      set_eq_bands(ch, state->eq_bands[ch], state->eq_nbands[ch]);
  // Bass redirection
  set_bass_redir(state->bass_redir);
  set_bass_freq(state->bass_freq);
  set_bass_channels(state->bass_channels);
  // Delays
  set_delay(state->delay);
  set_delay_units(state->delay_units);
  set_delays(state->delays);
  // Dithering
  set_dithering(state->dithering);
}
Exemplo n.º 2
0
Arquivo: zappy.c Projeto: 8102/Zappy
int		init_zappy(t_master *content, int ac, char **av)
{
  srand(time(NULL));
  content->max_clients = 0;
  content->width = 0;
  content->height = 0;
  content->delay = 0;
  content->nbr_egg = 0;
  content->nbr_player = 0;
  content->port = NULL;
  content->teams = NULL;
  content->clients = NULL;
  content->cases = NULL;
  if (!get_param(ac, av, content) || !check_param(content))
    return (usage(av[0]));
  set_timeout(content);
  set_delays(content);
  create_map(content);
  minerals_gen(content);
  init_server(&(content->server), content->port);
  print_creation(content);
  return (0);
}