Commit 54982f75 authored by Max Kellermann's avatar Max Kellermann

ao: declare AoData.writeSize as size_t

writeSize is a memory size and its type should thus be size_t. This allows us to remove two explicit casts.
parent fe142647
......@@ -27,7 +27,7 @@
static int driverInitCount;
typedef struct _AoData {
int writeSize;
size_t writeSize;
int driverId;
ao_option *options;
ao_device *device;
......@@ -218,8 +218,8 @@ audioOutputAo_play(void *data, const char *playChunk, size_t size)
return false;
while (size > 0) {
chunk_size = (size_t)ad->writeSize > size
? size : (size_t)ad->writeSize;
chunk_size = ad->writeSize > size
? size : ad->writeSize;
if (ao_play_deconst(ad->device, playChunk, chunk_size) == 0) {
audioOutputAo_error("Closing libao device due to play error");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment