JSAudioRecordingClip.java 文件源码

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

项目:romanov 作者:
JSAudioRecordingClip(Clip clip, AudioMetaData mdata)
{
    c = clip;
    // because Clip doesn't give access to the loop count
    // we just loop it ourselves by triggering off of a STOP event
    c.addLineListener( new LineListener()
    {
        public void update(LineEvent event)
        {
            if ( event.getType().equals( LineEvent.Type.STOP ) )
            {
                if ( playing && loopCount != 0 )
                {
                    c.setMicrosecondPosition( 0 );
                    c.start();
                    if ( loopCount > 0 )
                    {
                        loopCount--;
                    }
                }
                else
                {
                    playing = false;
                }
            }
        }
    } );
    playing = false;
    loopCount = 0;
    meta = mdata;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号