Example #1
0
    private void Awake()
    {
        _MainInput = new WaveInput();
        _MainInput.Enable();
        _BeatIndex = 0;

        _WaveDrawer = new WaveDrawer(8 * 12, 8 * 6, _WaveRenderer, _WaveTarget);

        _ActiveUI = false;
        _UI.gameObject.SetActive(_ActiveUI);
    }
Example #2
0
 /// <summary>
 /// Draw channel
 /// </summary>
 /// <param name="style">wave style</param>
 /// <param name="startPer">the percent of start position</param>
 /// <param name="scale">scale</param>
 /// <param name="width">width of the bitmap</param>
 /// <param name="height">height of the bitmap</param>
 /// <returns>bitmap that the wave drawed on</returns>
 public ImageSource DrawChannel(WaveStyle style, double startPer, double scale, double width, double height)
 {
     if (Channels == 1)
     {
         return(WaveDrawer.Draw1Channel(CacheData.Channel, style, startPer, scale, width, height));
     }
     else
     {
         return(WaveDrawer.Draw2Channel(CacheData.LeftChannel, CacheData.RightChannel, style, startPer, scale, width, height));
     }
 }
Example #3
0
 /// <summary>
 /// Draw a simple wave used for WaveSlider's background
 /// </summary>
 /// <param name="style">wave style</param>
 /// <returns>the bitmap that the wave drawed on</returns>
 public ImageSource DrawSimple(WaveStyle style)
 {
     return(WaveDrawer.DrawSimple(CacheData, style));
 }
Example #4
0
 /// <summary>
 /// Draw right channel if the wavfile is 2 channels
 /// </summary>
 /// <param name="style">wave style</param>
 /// <param name="startPer">percent of the start position</param>
 /// <param name="scale">scale</param>
 /// <param name="width">width of the bitmap</param>
 /// <param name="height">height of the bitmap</param>
 /// <returns>the bitmap that the wave drawed on</returns>
 public ImageSource DrawRightChannel(WaveStyle style, double startPer, double scale, double width, double height)
 {
     return(WaveDrawer.Draw1Channel(CacheData.RightChannel, style, startPer, scale, width, height));
 }