Skip to content

Commit

Permalink
time.time() となっていたのを time.monotonic() に修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tnoho committed Oct 13, 2024
1 parent b10e8c7 commit 017c973
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
- @voluntas
- [ADD] examples に E2E テストを追加する
- @voluntas
- [FIX] timestamp を付与するときの説明が time.time() となっていたのを time.monotonic() に修正
- libwebrtc 内の rtc::TimeMicros(), rtc::TimeMillis() の戻り値はエポックタイムではなくモノトニッククロックでした
- @tnoho

## 2024.3.0

Expand Down
4 changes: 2 additions & 2 deletions src/sora_audio_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class SoraAudioSource : public SoraTrackInterface {
*
* @param data 送信する 16bit PCM データの参照
* @param samples_per_channel チャンネルごとのサンプル数
* @param timestamp Python の time.time() で取得できるエポック秒で表されるフレームのタイムスタンプ
* @param timestamp Python の time.monotonic() で取得できるモノトニッククロックで表されるフレームのタイムスタンプ
*/
void OnData(const int16_t* data,
size_t samples_per_channel,
Expand All @@ -99,7 +99,7 @@ class SoraAudioSource : public SoraTrackInterface {
* Sora に送る音声データを渡します。
*
* @param ndarray NumPy の配列 numpy.ndarray で チャンネルごとのサンプル数 x チャンネル数 になっている音声データ
* @param timestamp Python の time.time() で取得できるエポック秒で表されるフレームのタイムスタンプ
* @param timestamp Python の time.monotonic() で取得できるモノトニッククロックで表されるフレームのタイムスタンプ
*/
void OnData(
nb::ndarray<int16_t, nb::shape<-1, -1>, nb::c_contig, nb::device::cpu>
Expand Down
4 changes: 2 additions & 2 deletions src/sora_video_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SoraVideoSource : public SoraTrackInterface {
* 表示側で音声データの timestamp と同期を取るため遅延が発生する場合があります。
*
* @param ndarray NumPy の配列 numpy.ndarray で H x W x BGR になっているフレームデータ
* @param timestamp Python の time.time() で取得できるエポック秒で表されるフレームのタイムスタンプ
* @param timestamp Python の time.monotonic() で取得できるモノトニッククロックで表されるフレームのタイムスタンプ
*/
void OnCaptured(
nb::ndarray<uint8_t, nb::shape<-1, -1, 3>, nb::c_contig, nb::device::cpu>
Expand All @@ -73,7 +73,7 @@ class SoraVideoSource : public SoraTrackInterface {
* 表示側で音声データの timestamp と同期を取るため遅延が発生する場合があります。
*
* @param ndarray NumPy の配列 numpy.ndarray で H x W x BGR になっているフレームデータ
* @param timestamp_us マイクロ秒単位の整数で表されるフレームのタイムスタンプ
* @param timestamp_us マイクロ秒単位の整数で表されるフレームのモノトニッククロックにおけるタイムスタンプ
*/
void OnCaptured(
nb::ndarray<uint8_t, nb::shape<-1, -1, 3>, nb::c_contig, nb::device::cpu>
Expand Down

0 comments on commit 017c973

Please sign in to comment.