From 7025da51ab7413b1fd35661e88a9e4223acf3c24 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 4 Jul 2021 15:46:43 +1000 Subject: [PATCH] API CHANGE: Remove MA_MIN/MAX_SAMPLE_RATE. These are replaced with ma_standard_sample_rate_min/max. --- miniaudio.h | 4 ---- tools/audioconverter/audioconverter.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 43f21e93..4a789d49 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -1909,10 +1909,6 @@ typedef enum ma_standard_sample_rate_count = 14 /* Need to maintain the count manually. Make sure this is updated if items are added to enum. */ } ma_standard_sample_rate; -/* These are deprecated. Use ma_standard_sample_rate_min and ma_standard_sample_rate_max. */ -#define MA_MIN_SAMPLE_RATE (ma_uint32)ma_standard_sample_rate_min -#define MA_MAX_SAMPLE_RATE (ma_uint32)ma_standard_sample_rate_max - typedef enum { diff --git a/tools/audioconverter/audioconverter.c b/tools/audioconverter/audioconverter.c index 3109befb..152718b9 100644 --- a/tools/audioconverter/audioconverter.c +++ b/tools/audioconverter/audioconverter.c @@ -40,7 +40,7 @@ void print_usage() printf(" s32 32-bit signed integer\n"); printf(" f32 32-bit floating point\n"); printf(" [channels] is optional and in the range of %d and %d\n", MA_MIN_CHANNELS, MA_MAX_CHANNELS); - printf(" [rate] is optional and in the range of %d and %d\n", MA_MIN_SAMPLE_RATE, MA_MAX_SAMPLE_RATE); + printf(" [rate] is optional and in the range of %d and %d\n", ma_standard_sample_rate_min, ma_standard_sample_rate_max); printf("\n"); printf("PARAMETERS:\n"); printf(" --linear-order [0..%d]\n", MA_MAX_FILTER_ORDER); @@ -150,7 +150,7 @@ ma_bool32 try_parse_channels(const char* str, ma_uint32* pValue) ma_bool32 try_parse_sample_rate(const char* str, ma_uint32* pValue) { - return try_parse_uint32_in_range(str, pValue, MA_MIN_SAMPLE_RATE, MA_MAX_SAMPLE_RATE); + return try_parse_uint32_in_range(str, pValue, ma_standard_sample_rate_min, ma_standard_sample_rate_max); } ma_bool32 try_parse_resample_algorithm(const char* str, ma_resample_algorithm* pValue)