From baac81253b3cc2e3addbbe6e90ec2a7abb5d56fd Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Tue, 18 Jul 2023 01:47:26 +1200 Subject: Code cleanup, slight API improvement --- src/c_aao.c | 75 +++++++++++++------------------------------------------------ 1 file changed, 16 insertions(+), 59 deletions(-) (limited to 'src/c_aao.c') diff --git a/src/c_aao.c b/src/c_aao.c index 731792d..7c6fe8d 100644 --- a/src/c_aao.c +++ b/src/c_aao.c @@ -9,65 +9,22 @@ -int type_live() { - return AO_TYPE_LIVE; -} - -int type_file() { - return AO_TYPE_FILE; -} - - - -int sample_little_endian() { - return AO_FMT_LITTLE; -} - -int sample_big_endian() { - return AO_FMT_BIG; -} - -int sample_native_endian() { - return AO_FMT_NATIVE; -} - - - -int error_no_driver() { - return AO_ENODRIVER; -} - -int error_not_file() { - return AO_ENOTFILE; -} - -int error_not_live() { - return AO_ENOTLIVE; -} - -int error_bad_option() { - return AO_EBADOPTION; -} - -int error_open_device() { - return AO_EOPENDEVICE; -} - -int error_open_file() { - return AO_EOPENFILE; -} - -int error_file_exists() { - return AO_EFILEEXISTS; -} - -int error_bad_format() { - return AO_EBADFORMAT; -} - -int error_fail() { - return AO_EFAIL; -} +const int type_live = AO_TYPE_LIVE; +const int type_file = AO_TYPE_FILE; + +const int sample_little_endian = AO_FMT_LITTLE; +const int sample_big_endian = AO_FMT_BIG; +const int sample_native_endian = AO_FMT_NATIVE; + +const int error_no_driver = AO_ENODRIVER; +const int error_not_file = AO_ENOTFILE; +const int error_not_live = AO_ENOTLIVE; +const int error_bad_option = AO_EBADOPTION; +const int error_open_device = AO_EOPENDEVICE; +const int error_open_file = AO_EOPENFILE; +const int error_file_exists = AO_EFILEEXISTS; +const int error_bad_format = AO_EBADFORMAT; +const int error_fail = AO_EFAIL; -- cgit