Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void trimSilenceFromBeginning(){
- int leadingCount = 0;
- for (int i = 0; i < this.samples.length; i++){
- if (this.samples[i] == 0){
- leadingCount = leadingCount + 1;
- }
- else { break; }
- }
- int[] samples_ = new int[this.samples.length - leadingCount];
- for (int i = leadingCount; i < this.samples.length; i++){
- samples_[i] = this.samples[i];
- }
- this.samples = samples_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement