Esempio n. 1
0
static MACHINE_RESET( magmax )
{
	timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 64, 0), 64, attotime_zero);

#if 0
	{
		int i;
		for (i=0; i<9; i++)
			logerror("SOUND Chan#%i name=%s\n", i, mixer_get_name(i) );
	}
#endif
}
Esempio n. 2
0
void magmax_state::machine_reset()
{
	m_interrupt_timer->adjust(m_screen->time_until_pos(64), 64);

#if 0
	{
		int i;
		for (i=0; i<9; i++)
			logerror("SOUND Chan#%i name=%s\n", i, mixer_get_name(i) );
	}
#endif
}
Esempio n. 3
0
static MACHINE_RESET( magmax )
{
	timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, 64, 0), 64);

#if 0
	{
		int i;
		for (i=0; i<9; i++)
			logerror("SOUND Chan#%i name=%s\n", i, mixer_get_name(i) );
	}
#endif
}
Esempio n. 4
0
static MACHINE_RESET( magmax )
{
	timer_adjust(interrupt_timer, cpu_getscanlinetime(64), 64, 0);

#if 0
	{
		int i;
		for (i=0; i<9; i++)
			logerror("SOUND Chan#%i name=%s\n", i, mixer_get_name(i) );
	}
#endif
}
Esempio n. 5
0
static MACHINE_RESET( magmax )
{
	magmax_state *state = machine.driver_data<magmax_state>();
	state->m_interrupt_timer->adjust(machine.primary_screen->time_until_pos(64), 64);

#if 0
	{
		int i;
		for (i=0; i<9; i++)
			logerror("SOUND Chan#%i name=%s\n", i, mixer_get_name(i) );
	}
#endif
}
Esempio n. 6
0
int main(int argc, char **argv)
{
    struct mixer *mixer;
    int card = 0;

    if ((argc > 2) && (strcmp(argv[1], "-D") == 0)) {
        argv++;
        if (argv[1]) {
            card = atoi(argv[1]);
            argv++;
            argc -= 2;
        } else {
            argc -= 1;
        }
    }

    mixer = mixer_open(card);
    if (!mixer) {
        fprintf(stderr, "Failed to open mixer\n");
        return EXIT_FAILURE;
    }


    if (argc == 1) {
        printf("Mixer name: '%s'\n", mixer_get_name(mixer));
        tinymix_list_controls(mixer);
    } else if (argc == 2) {
        tinymix_detail_control(mixer, argv[1], 1);
    } else if (argc >= 3) {
        tinymix_set_value(mixer, argv[1], &argv[2], argc - 2);
    } else {
        printf("Usage: tinymix [-D card] [control id] [value to set]\n");
    }

    mixer_close(mixer);

    return 0;
}
Esempio n. 7
0
void	xmame_set_mixer_volume( int ch, int level )
{
  if( use_fmgen ){
  switch( ch ){
  case XMAME_MIXER_FMPSG:
    if( level < FMPSGVOL_MIN ) level = FMPSGVOL_MIN;
    if( level > FMPSGVOL_MAX ) level = FMPSGVOL_MAX;
    mixer_set_mixing_level( 0, level );
    mixer_set_mixing_level( 1, level );
    break;
  case XMAME_MIXER_BEEP:
    if( level < BEEPVOL_MIN ) level = BEEPVOL_MIN;
    if( level > BEEPVOL_MAX ) level = BEEPVOL_MAX;
    mixer_set_mixing_level( 2, level );
    break;
  default:
    for( ch=0; ch<MIXER_MAX_CHANNELS ; ch++ ){
      const char *name = mixer_get_name(ch);
      if(name) printf( "%d[ch] %s\t:%d\n", ch,name,mixer_get_mixing_level(ch));
    }
    break;
  }
  return;
  }

  switch( ch ){
  case XMAME_MIXER_PSG:
    if( level < PSGVOL_MIN ) level = PSGVOL_MIN;
    if( level > PSGVOL_MAX ) level = PSGVOL_MAX;
    mixer_set_mixing_level( 0, level );
    mixer_set_mixing_level( 1, level );
    mixer_set_mixing_level( 2, level );
    break;
    
  case XMAME_MIXER_FM:
    if( level < FMVOL_MIN ) level = FMVOL_MIN;
    if( level > FMVOL_MAX ) level = FMVOL_MAX;
    if( sound_board==SOUND_I ){
      mixer_set_mixing_level( 3, level );
    }else{
      mixer_set_mixing_level( 3, level );
      mixer_set_mixing_level( 4, level );
    }
    break;
    
  case XMAME_MIXER_BEEP:
    if( level < BEEPVOL_MIN ) level = BEEPVOL_MIN;
    if( level > BEEPVOL_MAX ) level = BEEPVOL_MAX;
    if( sound_board==SOUND_I ){
      mixer_set_mixing_level( 4, level );
    }else{
      mixer_set_mixing_level( 5, level );
    }
    break;

  case XMAME_MIXER_RHYTHM:
    if( level < RHYTHMVOL_MIN ) level = RHYTHMVOL_MIN;
    if( level > RHYTHMVOL_MAX ) level = RHYTHMVOL_MAX;
    if( sound_board==SOUND_II ){
      rhythmvol = level;
    }
    break;

  case XMAME_MIXER_ADPCM:
    if( level < ADPCMVOL_MIN ) level = ADPCMVOL_MIN;
    if( level > ADPCMVOL_MAX ) level = ADPCMVOL_MAX;
    if( sound_board==SOUND_II ){
      adpcmvol = level;
    }
    break;

  default:
    for( ch=0; ch<MIXER_MAX_CHANNELS ; ch++ ){
      const char *name = mixer_get_name(ch);
      if(name) printf( "%d[ch] %s\t:%d\n", ch,name,mixer_get_mixing_level(ch));
    }
    break;
  }
}