音が出るまで、のこと 最後 その2
最後のつもりだったのですが、条件によってはやっぱり音がぶつ切れになります( ̄▽ ̄)
再生バッファへの書き込みは20msごとに行っていますが、ログを表示させると…
Boot : QDateTime("2014-04-26 09:38:58.542 JST Qt::LocalTime") Assertion SUCCESS : brynhildr.cpp : LINE : 253 [control] Connected for control. [graphics] Connected for graphics. [sound] Connected for sound. [sound] stop : IdleState [sound Buffer] get(int len) : size = 13312 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound Buffer] get(int len) : size = 5888 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 9728 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 5888 : len = 7680 [sound] stop : ActiveState [sound] stop : IdleState [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound] stop : ActiveState [sound] stop : IdleState [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 9728 : len = 7680
再生バッファへの書き込み時のバッファに置かれたデータサイズがsize、要求されているサイズがlenで出力されています。ことごとく要求されているデータサイズを下回っており、データ量が不足して再生処理が停止している(IdleStateに状態が遷移している)ようです。ActiveになったりIdleになったりを繰り返して、結果、音がぶつ切れになっているようです。
書き込みタイミングを40msに広げてみます。
Boot : QDateTime("2014-04-26 09:47:30.709 JST Qt::LocalTime") Assertion SUCCESS : brynhildr.cpp : LINE : 253 [control] Connected for control. [graphics] Connected for graphics. [sound] Connected for sound. [sound] stop : IdleState [sound Buffer] get(int len) : size = 23040 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 13312 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound] stop : ActiveState [sound] stop : IdleState [sound Buffer] get(int len) : size = 9728 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 9472 : len = 7680 [sound Buffer] get(int len) : size = 1792 : len = 7680 [sound Buffer] get(int len) : size = 5888 : len = 7680 [sound Buffer] get(int len) : size = 9472 : len = 7680 [sound Buffer] get(int len) : size = 1792 : len = 7680 [sound Buffer] get(int len) : size = 5888 : len = 7680 [sound Buffer] get(int len) : size = 9472 : len = 7680 [sound Buffer] get(int len) : size = 1792 : len = 7680 [sound Buffer] get(int len) : size = 9728 : len = 7680 [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 20992 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 13312 : len = 7680
ややリングバッファが満たされるようになり、IdleStateに落ちることも少なくはなっているようです。が、やはり再生バッファがemptyとなり、しばしばIdleStateに落ちているようです。これでは音がブツブツと切れます。理想的にはIdleStateに落ちることなく、バッファを書き込んでいきたいのです。
さらに60msに広げてみます。
Boot : QDateTime("2014-04-26 10:05:16.384 JST Qt::LocalTime") Assertion SUCCESS : brynhildr.cpp : LINE : 253 [control] Connected for control. [graphics] Connected for graphics. [sound] Connected for sound. [sound] stop : IdleState [sound Buffer] get(int len) : size = 20992 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 13312 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 9728 : len = 7680 [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 9472 : len = 7680 [sound Buffer] get(int len) : size = 1792 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 13568 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 5888 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 19200 : len = 7680
少し聴きやすくなりました。IdleStateになる状況も少なくなりました。
さらに80msに広げてみます。
Boot : QDateTime("2014-04-26 10:08:15.637 JST Qt::LocalTime") Assertion SUCCESS : brynhildr.cpp : LINE : 253 [control] Connected for control. [graphics] Connected for graphics. [sound] Connected for sound. [sound] stop : IdleState [sound Buffer] get(int len) : size = 26880 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 19200 : len = 7680 [sound Buffer] get(int len) : size = 11520 : len = 7680 [sound Buffer] get(int len) : size = 3840 : len = 7680 [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 20992 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 13312 : len = 7680 [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound Buffer] get(int len) : size = 17408 : len = 7680 [sound Buffer] get(int len) : size = 9728 : len = 7680 [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 13312 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 5632 : len = 7680 [sound Buffer] get(int len) : size = 9728 : len = 7680 [sound Buffer] get(int len) : size = 2048 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 15360 : len = 7680 [sound] stop : ActiveState [sound Buffer] get(int len) : size = 7680 : len = 7680 [sound] stop : IdleState [sound Buffer] get(int len) : size = 17152 : len = 7680 [sound] stop : ActiveState
う、IdleStateが増えました。単純に間隔を開ければデータは沢山バッファリングできますが、今度は再生バッファが空になりやすくなりました。これって通信速度にも影響されるのではないでしょうか…
« 音が出るまで、のこと 最後 | トップページ | 音が出るまで、のこと 最後 その3 »
コメント