Skip to content

Commit 4c3ac0b

Browse files
dependabot[bot]kixelatedclaude
authored
build(deps): bump boytacean to 0.12.1 (hold reqwest-middleware at 0.4) (#1820)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Luke Curley <kixelated@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ac22434 commit 4c3ac0b

5 files changed

Lines changed: 43 additions & 32 deletions

File tree

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ updates:
3232
cargo:
3333
patterns:
3434
- "*"
35+
ignore:
36+
# reqwest-middleware 0.5 requires reqwest 0.13, but http-cache-reqwest's
37+
# latest stable (0.16) still pins reqwest 0.12 / reqwest-middleware 0.4.
38+
# The only pairing is http-cache-reqwest 1.0.0-alpha (pre-release), so we
39+
# hold reqwest-middleware at 0.4 until that line ships stable.
40+
- dependency-name: "reqwest-middleware"
41+
versions: [">=0.5"]
3542

3643
- package-ecosystem: "bun"
3744
directory: "/"

Cargo.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rs/moq-boy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ websocket = ["moq-native/websocket"]
1919

2020
[dependencies]
2121
anyhow = { version = "1", features = ["backtrace"] }
22-
boytacean = { version = "0.11", features = ["gen-mock"] }
22+
boytacean = { version = "0.12", features = ["gen-mock"] }
2323
bytes = "1"
2424
clap = { version = "4", features = ["derive"] }
2525
hang = { workspace = true }

rs/moq-boy/src/audio.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Audio: stereo unsigned-8-bit PCM (Game Boy APU) -> Opus -> MoQ.
1+
//! Audio: stereo signed-16-bit PCM (Game Boy APU) -> Opus -> MoQ.
22
//!
33
//! A thin wrapper over [`moq_audio::AudioProducer`], which resamples to 48 kHz,
44
//! encodes Opus, and anchors timestamps to a wall clock so audio stays in sync
@@ -26,7 +26,7 @@ impl AudioEncoder {
2626
input_sample_rate: u32,
2727
) -> Result<Self> {
2828
let input = moq_audio::EncoderInput {
29-
format: moq_audio::AudioFormat::U8,
29+
format: moq_audio::AudioFormat::S16,
3030
sample_rate: input_sample_rate,
3131
channels: CHANNELS,
3232
};
@@ -48,12 +48,16 @@ impl AudioEncoder {
4848
self.producer.reset_epoch();
4949
}
5050

51-
/// Push interleaved unsigned-8-bit stereo PCM captured at `elapsed` (since
51+
/// Push interleaved signed-16-bit stereo PCM captured at `elapsed` (since
5252
/// the emulator started, shared with the video clock).
53-
pub fn push_samples(&mut self, samples: &[u8], elapsed: Duration) -> Result<()> {
53+
pub fn push_samples(&mut self, samples: &[i16], elapsed: Duration) -> Result<()> {
54+
let mut data = Vec::with_capacity(samples.len() * 2);
55+
for sample in samples {
56+
data.extend_from_slice(&sample.to_le_bytes());
57+
}
5458
let frame = moq_audio::Frame {
5559
timestamp_us: elapsed.as_micros() as u64,
56-
data: Bytes::copy_from_slice(samples),
60+
data: Bytes::from(data),
5761
};
5862
self.producer.write(&frame)?;
5963
Ok(())

rs/moq-boy/src/emulator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ impl Emulator {
124124
rgba
125125
}
126126

127-
/// Drain accumulated audio samples from the APU.
128-
pub fn audio_samples(&mut self) -> Vec<u8> {
129-
let samples: Vec<u8> = self.gb.audio_buffer().iter().copied().collect();
127+
/// Drain accumulated 16-bit PCM audio samples from the APU.
128+
pub fn audio_samples(&mut self) -> Vec<i16> {
129+
let samples: Vec<i16> = self.gb.audio_buffer().iter().copied().collect();
130130
self.gb.clear_audio_buffer();
131131
samples
132132
}

0 commit comments

Comments
 (0)