/[svn]/jsampler/trunk/src/org/jsampler/task/Global.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/task/Global.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1539 by iliev, Thu May 24 21:43:45 2007 UTC revision 1540 by iliev, Mon Dec 3 23:22:02 2007 UTC
# Line 28  import org.jsampler.CC; Line 28  import org.jsampler.CC;
28  import org.jsampler.HF;  import org.jsampler.HF;
29    
30  import org.linuxsampler.lscp.ServerInfo;  import org.linuxsampler.lscp.ServerInfo;
31    import org.linuxsampler.lscp.Instrument;
32    
33  import static org.jsampler.JSI18n.i18n;  import static org.jsampler.JSI18n.i18n;
34    
# Line 91  public class Global { Line 92  public class Global {
92           * This task gets the global volume of the sampler.           * This task gets the global volume of the sampler.
93           */           */
94          public static class GetVolume extends EnhancedTask<Float> {          public static class GetVolume extends EnhancedTask<Float> {
95                  /** Creates a new instance of <code>Get</code>. */                  /** Creates a new instance of <code>GetVolume</code>. */
96                  public                  public
97                  GetVolume() {                  GetVolume() {
98                          setTitle("Global.GetVolume_task");                          setTitle("Global.GetVolume_task");
# Line 138  public class Global { Line 139  public class Global {
139                          }                          }
140                  }                  }
141          }          }
142            
143            /**
144             * This task gets the list of instruments in the specified instrument file.
145             */
146            public static class GetFileInstruments extends EnhancedTask<Instrument[]> {
147                    private final String filename;
148                    
149                    /** Creates a new instance of <code>GetFileInstruments</code>. */
150                    public
151                    GetFileInstruments(String filename) {
152                            this.filename = filename;
153                            setTitle("Global.GetFileInstruments_task");
154                            setDescription(i18n.getMessage("Global.GetFileInstruments.desc"));
155                    }
156            
157                    /** The entry point of the task. */
158                    public void
159                    run() {
160                            try { setResult(CC.getClient().getFileInstruments(filename)); }
161                            catch(Exception x) {
162                                    String s = getDescription() + ": " + HF.getErrorMessage(x);
163                                    CC.getLogger().log(Level.FINER, s, x);
164                            }
165                    }
166            }
167  }  }

Legend:
Removed from v.1539  
changed lines
  Added in v.1540

  ViewVC Help
Powered by ViewVC