SHARE
TWEET

Untitled

a guest May 26th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void trimSilenceFromBeginning(){
  2.         int leadingCount = 0;
  3.         for (int i = 0; i < this.samples.length; i++){
  4.             if (this.samples[i] == 0){
  5.                 leadingCount = leadingCount + 1;
  6.             }
  7.             else { break; }
  8.         }
  9.         int[] samples_ = new int[this.samples.length - leadingCount];
  10.         for (int i = leadingCount; i < this.samples.length; i++){
  11.             samples_[i] = this.samples[i];
  12.         }
  13.         this.samples = samples_;
  14.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top