summaryrefslogtreecommitdiff
path: root/src/bimu
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-01-27 20:39:25 -0500
committerAndrew Opalach <andrew@akon.city> 2024-01-27 20:39:25 -0500
commitb100eb175e0cfa59a15c4125f26ab5474c2347ec (patch)
treef1ee4f8bed5d3490ba5d70a6fc194f3206df8df4 /src/bimu
parentfb1cbf546300d9f8efdf21c6ac66f7c2f1dfd4f3 (diff)
downloadcamu-b100eb175e0cfa59a15c4125f26ab5474c2347ec.tar.gz
camu-b100eb175e0cfa59a15c4125f26ab5474c2347ec.tar.bz2
camu-b100eb175e0cfa59a15c4125f26ab5474c2347ec.zip
wip
- Mostly work in the client Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/bimu')
-rw-r--r--src/bimu/vcr.c4
-rw-r--r--src/bimu/vcr.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bimu/vcr.c b/src/bimu/vcr.c
index c5bb0e8..fcef62e 100644
--- a/src/bimu/vcr.c
+++ b/src/bimu/vcr.c
@@ -57,7 +57,7 @@ void bmu_vcr_add_stream(struct bmu_vcr *vcr, struct bmu_vcr_stream *stream)
aki_cond_init(&stream->cond);
aki_mutex_init(&stream->mutex);
aki_packet_cache_init(&stream->cache, VCR_BUFFER_HIGH);
- stream->buffered = false;
+ stream->buffered = 0;
al_array_push(vcr->streams, stream);
al_atomic_s32_store(&stream->state, BIMU_STREAM_RUNNING, AL_ATOMIC_RELAXED);
}
@@ -87,7 +87,7 @@ bool bmu_vcr_push_packet(struct bmu_vcr *vcr, struct aki_packet *packet)
} else if (al_atomic_u64_add(&vcr->count, 1, AL_ATOMIC_RELAXED) >= VCR_BUFFER_BUFFERED) {
aki_packet_stream_cork(vcr->data, true);
al_array_foreach(vcr->streams, i, stream) {
- stream->buffered = true;
+ stream->buffered = 1;
}
}
break;
diff --git a/src/bimu/vcr.h b/src/bimu/vcr.h
index 5a6d8d5..0f81c12 100644
--- a/src/bimu/vcr.h
+++ b/src/bimu/vcr.h
@@ -20,7 +20,7 @@ struct bmu_vcr_stream {
struct bmu_client_handler *client;
atomic_s32 state;
struct aki_packet_cache cache;
- bool buffered;
+ s32 buffered;
struct aki_cond cond;
struct aki_mutex mutex;
bool running;