You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 56717c2
Browse filesBrowse the repository at this point in the historyBrowse files
Always report the source signal, and drop line_sense
roles/source/v1.md now requires `signal` in every client/state source
object and no longer has a line_sense feature (Sendspin/spec#335). The
role sends an empty source@v1 support object, set_signal() is always
taken, and the signal is ABSENT until one is set, so a source that
detects nothing never hints a start. SourceRoleConfig::line_sense is
gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It never waits or allocates. It refuses audio while the stream is closed, a write that is not a whole number of frames, a write longer than the capture buffer takes at once (see `capture_buffer_ms` in [SourceRoleConfig](#sourceroleconfig)), and a write that finds the capture buffer full; after a stall the stream resumes from live capture rather than sending the stale backlog. Start capturing in `on_streaming_started()` and stop in `on_streaming_stopped()` (see [SourceRoleListener](#sourcerolelistener)); the client holds high-performance networking (`on_request_high_performance()`) between the two, as it does during playback. Stop calling `write_audio()` before destroying the client.
193
193
194
-
A role configured with `line_sense`reports the capture input's signal state from the main loop thread, which goes to the server in `client/state`:
194
+
The role reports the capture input's signal state in every `client/state`, as roles/source/v1.md requires. It is `ABSENT` until set, so a source that detects nothing never hints a start; set it from the main loop thread:
195
195
196
196
```cpp
197
197
source.set_signal(SourceSignal::PRESENT); // or ABSENT
@@ -1605,7 +1605,6 @@ Configuration passed to `client.add_source()`. A value that breaks any rule belo
1605
1605
|`capture_buffer_ms`|`uint32_t`|`500`| More than 0 ms; about the longest network stall the stream rides out without a gap; a longer one resumes from live capture. A single write must fit in just under 5/8 of it. |
1606
1606
|`opus_bitrate`|`uint32_t`|`128000`| Opus bitrate in bit/s, 500 to 512000; ignored for `PCM` and `FLAC`|
1607
1607
|`opus_complexity`|`uint8_t`|`2`| Opus encoder complexity, at most 10; ignored for `PCM` and `FLAC`|
1608
-
|`line_sense`|`bool`|`false`| Advertise signal sensing; see `SourceRole::set_signal()`|
1609
1608
|`metadata`|`bool`|`false`| Allow `SourceRole::set_metadata()`; reserves its text block when the role is added |
1610
1609
|`buffer_location`|`MemoryLocation`|`PREFER_EXTERNAL`| Placement of the capture buffer, the chunk buffer and a `FLAC` or `OPUS` encoder's chunk scratch (ESP-IDF only) |
1611
1610
|`priority`|`unsigned`|`3`| FreeRTOS priority for the source task, below the protocol and httpd tasks (ESP-IDF only) |
@@ -1760,7 +1759,7 @@ These represent commands the server can send to the player. The player advertise
1760
1759
|`PRESENT`| Audio signal detected on the capture input |
1761
1760
|`ABSENT`| No audio signal on the capture input |
1762
1761
1763
-
Reported with `SourceRole::set_signal()`; meaningful only with `SourceRoleConfig::line_sense` set.
1762
+
Reported with `SourceRole::set_signal()`, and `ABSENT` until it is first called.
0 commit comments