SoftAudioPusher.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:jdk8u_jdk 作者:
public void run() {
    byte[] buffer = SoftAudioPusher.this.buffer;
    AudioInputStream ais = SoftAudioPusher.this.ais;
    SourceDataLine sourceDataLine = SoftAudioPusher.this.sourceDataLine;

    try {
        while (active) {
            // Read from audio source
            int count = ais.read(buffer);
            if(count < 0) break;
            // Write byte buffer to source output
            sourceDataLine.write(buffer, 0, count);
        }
    } catch (IOException e) {
        active = false;
        //e.printStackTrace();
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号