Subversion Repositories svn.mios

Rev

Rev 642 | Rev 684 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 642 Rev 657
Line 1... Line 1...
1
package org.midibox.apps.miosstudiosid;
1
package org.midibox.apps.miosstudiosid;
2
-
 
3
import java.util.Observable;
-
 
4
2
5
import org.midibox.apps.SIDV2librarian.SIDV2librarian;
3
import org.midibox.apps.SIDV2librarian.SIDV2librarian;
6
4
7
public class MIOSStudioSID extends org.midibox.apps.miosstudio.MIOSStudio {
5
public class MIOSStudioSID extends org.midibox.apps.miosstudio.MIOSStudio {
8
6
Line 16... Line 14...
16
    protected void createDevices() {
14
    protected void createDevices() {
17
15
18
        super.createDevices();
16
        super.createDevices();
19
17
20
        sidv2librarian = new SIDV2librarian(null, null);
18
        sidv2librarian = new SIDV2librarian(null, null);
21
-
 
22
        sidv2librarian.getSIDLibController().addObserver(this);
-
 
23
    }
19
    }
24
20
25
    protected void routeIndividualDevices() {
21
    protected void routeIndividualDevices() {
26
22
27
        super.routeIndividualDevices();
23
        super.routeIndividualDevices();
Line 38... Line 34...
38
34
39
        midiDeviceRouting.connectDevices(miosStudioInPort, sidv2librarian
35
        midiDeviceRouting.connectDevices(miosStudioInPort, sidv2librarian
40
                .getSysExControllerDevice());
36
                .getSysExControllerDevice());
41
        midiDeviceRouting.connectDevices(sidv2librarian
37
        midiDeviceRouting.connectDevices(sidv2librarian
42
                .getSysExControllerDevice(), miosStudioOutPort);
38
                .getSysExControllerDevice(), miosStudioOutPort);
43
    }
-
 
44
-
 
45
    public void update(Observable observable, Object object) {
-
 
46
-
 
47
        super.update(observable, object);
-
 
48
-
 
49
        if (object == "Edit") {
-
 
50
-
 
51
            boolean portsReleased = midiDeviceRouting.getPortsReleased();
-
 
52
-
 
53
            if (!portsReleased) {
-
 
54
                midiDeviceRouting.setPortsReleased(true);
-
 
55
                midiDeviceRouting.setPortsReleased(false);
-
 
56
            }
-
 
57
        }
-
 
58
    }
39
    }
59
}
40
}