summaryrefslogtreecommitdiff
path: root/src/buffer
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer')
-rw-r--r--src/buffer/audio.c6
-rw-r--r--src/buffer/video.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/buffer/audio.c b/src/buffer/audio.c
index cf42840..ce027af 100644
--- a/src/buffer/audio.c
+++ b/src/buffer/audio.c
@@ -11,7 +11,7 @@
#define BUFFER_SIZE 8.0
#define BUFFER_MARK_MIN 3.25 // Must be a most half of the buffer size.
-#define BUFFER_MARK_BUFFERED 1.25
+#define BUFFER_MARK_BUFFERED 1.0
#ifdef CAMU_AUDIO_BUFFER_FADE
#define FADE_STEP(fmt) (1.75f / (fmt)->sample_rate)
@@ -408,8 +408,8 @@ ptrdiff_t camu_audio_buffer_read(struct camu_audio_buffer *buf, u8 *data, ptrdif
if (step != 0.f || buf->fade.volume != 1.f) {
if (buf->volume.user > 1.f) {
- // Only adjust the step if it's an increase to avoid
- // drawn-out fades if the volume is low.
+ // Only adjust the step if it's an increase to avoid drawn-out
+ // fades if the volume is low.
step *= buf->volume.user;
}
buf->fade.volume = apply_volume(data, req, fmt, buf->fade.volume, buf->volume.user, step);
diff --git a/src/buffer/video.c b/src/buffer/video.c
index bb217af..7771939 100644
--- a/src/buffer/video.c
+++ b/src/buffer/video.c
@@ -17,13 +17,12 @@
bool camu_video_buffer_init(struct camu_video_buffer *buf, struct camu_clock *clock)
{
-
buf->clock = clock;
buf->latency = 0.0;
al_atomic_store(f64)(&buf->pts, -1.0, AL_ATOMIC_RELAXED);
buf->last_pts = -1.0;
// The least confusing behavior for single_frame is that it can't be
- // set unless the buffer is not empty.
+ // set if the buffer is empty.
buf->single_frame = false;
buf->avg_frame_duration = 0.0;
buf->queue = NULL;