예제 #1
0
  /**
   * Draws the first n frames of the audio stream on to a chart. Will label each of the streams as
   * "Stream n" and a legend will be shown on the chart if there is more than one stream.
   *
   * @param numFrames The number of frames to draw
   * @param colouredFrames Whether to colour individual frames
   * @param streams The audio streams
   */
  public static void drawChart(
      final int numFrames, final boolean colouredFrames, final AudioStream... streams) {
    final List<IndependentPair<AudioStream, String>> pairs =
        new ArrayList<IndependentPair<AudioStream, String>>();

    for (int i = 0; i < streams.length; i++)
      pairs.add(new IndependentPair<AudioStream, String>(streams[i], "Stream " + i));

    AudioFramePlot.drawChart(numFrames, colouredFrames, pairs);
  }
예제 #2
0
 /**
  * Draws the first n frames of the audio stream on to a chart. If the number of streams is 1, then
  * the frames will be coloured, otherwise the streams will be coloured. The streams will be named
  * "Stream n" and a legend shown if there is more than one stream.
  *
  * @param numFrames The number of frames to draw
  * @param streams The audio streams
  */
 public static void drawChart(final int numFrames, final AudioStream... streams) {
   if (streams.length == 1) AudioFramePlot.drawChart(numFrames, true, streams);
   else AudioFramePlot.drawChart(numFrames, false, streams);
 }