/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/AudioOutputChannel.java
ViewVC logotype

Annotation of /jlscp/trunk/src/org/linuxsampler/lscp/AudioOutputChannel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 596 - (hide annotations) (download)
Wed Jun 1 07:11:31 2005 UTC (18 years, 11 months ago) by iliev
File size: 3469 byte(s)
The first alpha-release of jlscp

1 iliev 596 /*
2     * jlscp - a java LinuxSampler control protocol API
3     *
4     * Copyright (C) 2005 Grigor Kirilov Iliev
5     *
6     * This file is part of jlscp.
7     *
8     * jlscp is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License version 2
10     * as published by the Free Software Foundation.
11     *
12     * jlscp is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with jlscp; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20     * MA 02111-1307 USA
21     */
22    
23     package org.linuxsampler.lscp;
24    
25     import java.util.Vector;
26    
27    
28     /**
29     * This class provides detailed information about an audio output chanel.
30     * @author Grigor Iliev
31     */
32     public class AudioOutputChannel {
33     private String name = null;
34     private boolean mixChannel = false;
35     private int mcDst = 0;
36    
37     private final Vector<Parameter> prmList = new Vector<Parameter>();
38    
39    
40     /** Creates a new instance of AudioOutputChannel */
41     public AudioOutputChannel() {
42     }
43    
44     /**
45     * Gets the name of this audio output channel.
46     * @return The name of this audio output channel.
47     */
48     public String
49     getName() { return name; }
50    
51     /**
52     * Sets the name of this audio output channel.
53     * @param name A <code>String</code> object containing the new name
54     * for this audio output channel.
55     */
56     public void
57     setName(String name) { this.name = name; }
58    
59     /**
60     * Determines whether this channel is a mix-channel.
61     * @return <code>true</code> if this is a mix-channel, <code>false</code> otherwise.
62     */
63     public boolean
64     isMixChannel() { return mixChannel; }
65    
66     /**
67     * Sets whether this channel is a mix-channel.
68     * @param mixChannel Specifies whether this channel is a mix-channel or not.
69     */
70     public void
71     setMixChannel(boolean mixChannel) { this.mixChannel = mixChannel; }
72    
73     /**
74     * Gets the number of the real audio channel this mix channel refers to.
75     * @return The number of the real audio channel this mix channel refers to.
76     */
77     public int
78     getMixChannelDest() { return mcDst; }
79    
80     /**
81     * Sets the number of the real audio channel this mix channel refers to.
82     * @param chNum The number of the real audio channel this mix channel refers to.
83     */
84     public void
85     setMixChannelDest(int chNum) { mcDst = chNum; }
86    
87     /**
88     * Adds additional parameter to this audio output channel.
89     * @param prm The additional parameter to be added.
90     */
91     public void
92     addParameter(Parameter prm) { prmList.add(prm); }
93    
94     /**
95     * Gets an <code>Parameter</code> array with the additional parameters
96     * of this audio output channel.
97     * @return An <code>Parameter</code> array with the additional parameters
98     * of this audio output channel.
99     */
100     public Parameter[]
101     getAdditionalParameters() {
102     return prmList.toArray(new Parameter[prmList.size()]);
103     }
104    
105     /**
106     * Determines whether this audio output channel has additional parameters.
107     * @return <code>true</code> if this audio output channel has additional parameters,
108     * <code>false</code> otherwise.
109     */
110     public boolean
111     hasAdditionalParameters() { return prmList.size() > 0; }
112    
113     /**
114     * Returns the name of this audio output chanel.
115     * @return The name of this audio output chanel.
116     */
117     public String
118     toString() { return getName(); }
119     }

  ViewVC Help
Powered by ViewVC