Skip to content

Commit

Permalink
Merge branch 'develop' into feature/e2e-test
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed May 22, 2024
2 parents 836c45f + d107131 commit 1697334
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

- [UPDATE] Sora C++ SDK のバージョンを `2024.6.1` に上げる
- @voluntas
- [FIX] SoraAudioSink.read が timeout を無視して失敗を返すケースがあったので修正する
- @enm10k

## 2024.2.0

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "sora_sdk"
authors = [{ name = "Shiguredo Inc.", email = "contact+pypi@shiguredo.jp" }]
version = "2024.3.0.dev0"
version = "2024.3.0.dev1"
description = "WebRTC SFU Sora Python SDK"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
7 changes: 4 additions & 3 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false

-e file:.
auditwheel==6.0.0
Expand All @@ -26,8 +27,8 @@ pyelftools==0.31
# via auditwheel
pyproject-hooks==1.1.0
# via build
pytest==8.2.0
pytest==8.2.1
python-dotenv==1.0.1
ruff==0.4.2
setuptools==69.5.1
ruff==0.4.4
setuptools==70.0.0
wheel==0.43.0
1 change: 1 addition & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false

-e file:.
7 changes: 3 additions & 4 deletions src/sora_audio_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ void SoraAudioSinkImpl::AppendData(const int16_t* audio_data,
nb::tuple SoraAudioSinkImpl::Read(size_t frames, float timeout) {
std::unique_lock<std::mutex> lock(buffer_mtx_);

if (buffer_.size() == 0) {
// 返すものがない時は即座に返す
return nb::make_tuple(false, nb::none());
}
size_t num_of_samples;
if (frames > 0) {
// フレーム数のリクエストがある場合はリクエスト分が貯まるまで待つ
Expand All @@ -160,6 +156,9 @@ nb::tuple SoraAudioSinkImpl::Read(size_t frames, float timeout) {
}
} else {
// フレーム数のリクエストがない場合はあるだけ全部出す
if (buffer_.empty()) {
return nb::make_tuple(false, nb::none());
}
num_of_samples = buffer_.size();
}

Expand Down

0 comments on commit 1697334

Please sign in to comment.