Examples of AudioInfo


Examples of com.mojang.minecraft.sound.AudioInfo

         Minecraft var5;
         if((var5 = this.rendererContext$5cd64a7f).soundPlayer == null || !var5.settings.sound) {
            return;
         }

         AudioInfo var6;
         if(var2.distanceToSqr(var5.player) < 1024.0F && (var6 = var5.sound.getAudioInfo(var1, var3, var4)) != null) {
            var5.soundPlayer.play(var6, new EntitySoundPos(var2, var5.player));
         }
      }
View Full Code Here

Examples of com.mojang.minecraft.sound.AudioInfo

         Minecraft var7;
         if((var7 = this.rendererContext$5cd64a7f).soundPlayer == null || !var7.settings.sound) {
            return;
         }

         AudioInfo var8;
         if((var8 = var7.sound.getAudioInfo(var1, var5, var6)) != null) {
            var7.soundPlayer.play(var8, new LevelSoundPos(var2, var3, var4, var7.player));
         }
      }
View Full Code Here

Examples of huu.phong.musiconline.model.AudioInfo

            }
          } while (!metadata.isLast());
          metaDataLength = (int) decoder.getTotalBytesRead();
      duration = (int) (streamInfo.getTotalSamples() * 1000.0 / streamInfo.getSampleRate());
      bitrate = (int) (((in.getLength() - metaDataLength) * 8.0) / (streamInfo.getTotalSamples() / streamInfo.getSampleRate()));
      audioInfo = new AudioInfo("FLAC", true, bitrate / 1000, streamInfo.getSampleRate(), streamInfo.getChannels(), in.getLength(), getDuration());
      fmt = new AudioFormat(streamInfo.getSampleRate(), 16, streamInfo.getChannels(), true, false);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of huu.phong.musiconline.model.AudioInfo

      e.printStackTrace();
    }
    if (header == null) throw new RuntimeException("Can not get header");
    fmt = new AudioFormat(header.frequency(), 16, header.mode() == Header.SINGLE_CHANNEL ? 1 : 2, true, false);
    duration = (int) header.total_ms(in.getLength() - metaDataLength);
    audioInfo = new AudioInfo("MP3", header.vbr(), header.bitrate() / 1000, header.frequency(), header.mode() == Header.SINGLE_CHANNEL ? 1 : 2, in.getLength(), duration);
  }
View Full Code Here

Examples of huu.phong.musiconline.model.AudioInfo

    if (decoder == null) return 0;
    return decoder.getDuration();
  }
 
  public AudioInfo getAudioInfo(){
    if (decoder == null) return new AudioInfo();
    return audioInfo;
  }
View Full Code Here

Examples of huu.phong.musiconline.model.AudioInfo

    this.in = in;
    try {
      stream = AudioSystem.getAudioInputStream(in);
      fmt = stream.getFormat();
      duration = (int) (in.length / (fmt.getChannels() * fmt.getSampleRate() / 8000.0 * fmt.getSampleSizeInBits()));
      info = new AudioInfo("WAV", false, (int)(fmt.getChannels() * fmt.getSampleRate() / 1000.0 * fmt.getSampleSizeInBits()), (int) fmt.getSampleRate(), fmt.getChannels(), in.getLength(), duration);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.