~ubuntu-branches/ubuntu/lucid/tuxguitar/lucid

« back to all changes in this revision

Viewing changes to TuxGuitar-winmm/src/org/herac/tuxguitar/player/impl/midiport/winmm/MidiPortImpl.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2009-04-25 19:49:27 UTC
  • mfrom: (1.1.3 upstream) (2.1.7 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090425194927-pblqed0zxp0pmyeq
Tags: 1.1-1
* New Upstream Release (Closes: #489859) (LP: #366476)
* Merged patch : tuxguitar_1.0.dak-1ubuntu1.patch
* debian/README.txt
  - suggests to install tuxguitar-jsa

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.herac.tuxguitar.player.impl.midiport.winmm;
2
 
 
3
 
import org.herac.tuxguitar.player.base.MidiOut;
4
 
import org.herac.tuxguitar.player.base.MidiPort;
5
 
 
6
 
public class MidiPortImpl extends MidiPort{
7
 
        
8
 
        private final int device;
9
 
        private final MidiOutImpl midiOut;
10
 
        
11
 
        public MidiPortImpl(MidiSystem midiSystem,String name,int device){
12
 
                super(MidiPortImpl.toString(device),name);
13
 
                this.device = device;
14
 
                this.midiOut = new MidiOutImpl(this,midiSystem);
15
 
        }
16
 
        
17
 
        public void open(){
18
 
                if(!this.midiOut.isConnected()){
19
 
                        this.midiOut.connect();
20
 
                }
21
 
        }
22
 
        
23
 
        public void close(){
24
 
                this.midiOut.disconnect();
25
 
        }
26
 
        
27
 
        public MidiOut out(){
28
 
                this.open();
29
 
                return this.midiOut;
30
 
        }
31
 
        
32
 
        public void check(){
33
 
                // Not implemented
34
 
        }
35
 
        
36
 
        public int getDevice() {
37
 
                return this.device;
38
 
        }
39
 
        
40
 
        public static String toString(int device){
41
 
                return (Integer.toString(device));
42
 
        }
43
 
}
 
 
b'\\ No newline at end of file'