From 265b8fffb270325f62a15a842fe4498c87a08204 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 12 Sep 2008 16:41:20 +0200 Subject: shout: make the shout_buffer static Since the buffer size is known at compile time, we can save an indirection by declaring it as a char array instead of a pointer. That saves an extra allocation, and we can calculate with the compile-time constant sizeof(data) instead of the attribute "max_len". --- src/audioOutputs/audioOutput_shout.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/audioOutputs/audioOutput_shout.h') diff --git a/src/audioOutputs/audioOutput_shout.h b/src/audioOutputs/audioOutput_shout.h index b3ad00139..ddab852df 100644 --- a/src/audioOutputs/audioOutput_shout.h +++ b/src/audioOutputs/audioOutput_shout.h @@ -54,9 +54,8 @@ struct shout_encoder_plugin { }; struct shout_buffer { - unsigned char *data; + unsigned char data[8192]; size_t len; - size_t max_len; }; struct shout_data { -- cgit v1.2.3