jdk/src/share/classes/com/sun/media/sound/SoftChannel.java
changeset 6502 13b20559a04a
parent 5506 202f599c92aa
child 6503 600ab3437bb8
equal deleted inserted replaced
6501:684810d882b3 6502:13b20559a04a
     1 /*
     1 /*
     2  * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   114     protected SoftTuning tuning = new SoftTuning();
   114     protected SoftTuning tuning = new SoftTuning();
   115     protected int tuning_bank = 0;
   115     protected int tuning_bank = 0;
   116     protected int tuning_program = 0;
   116     protected int tuning_program = 0;
   117     protected SoftInstrument current_instrument = null;
   117     protected SoftInstrument current_instrument = null;
   118     protected ModelChannelMixer current_mixer = null;
   118     protected ModelChannelMixer current_mixer = null;
   119     private ModelDirector current_director = null;
   119     protected ModelDirector current_director = null;
   120 
   120 
   121     // Controller Destination Settings
   121     // Controller Destination Settings
   122     protected int cds_control_number = -1;
   122     protected int cds_control_number = -1;
   123     protected ModelConnectionBlock[] cds_control_connections = null;
   123     protected ModelConnectionBlock[] cds_control_connections = null;
   124     protected ModelConnectionBlock[] cds_channelpressure_connections = null;
   124     protected ModelConnectionBlock[] cds_channelpressure_connections = null;
  1266     public void programChange(int bank, int program) {
  1266     public void programChange(int bank, int program) {
  1267         bank = restrict7Bit(bank);
  1267         bank = restrict7Bit(bank);
  1268         program = restrict7Bit(program);
  1268         program = restrict7Bit(program);
  1269         synchronized (control_mutex) {
  1269         synchronized (control_mutex) {
  1270             mainmixer.activity();
  1270             mainmixer.activity();
  1271             this.bank = bank;
  1271             if(this.bank != bank || this.program != program)
  1272             this.program = program;
  1272             {
  1273             current_instrument = null;
  1273                 this.bank = bank;
       
  1274                 this.program = program;
       
  1275                 current_instrument = null;
       
  1276             }
  1274         }
  1277         }
  1275     }
  1278     }
  1276 
  1279 
  1277     public int getProgram() {
  1280     public int getProgram() {
  1278         synchronized (control_mutex) {
  1281         synchronized (control_mutex) {