diff options
author | Dan Glastonbury <[email protected]> | 2017-06-23 17:34:34 +1000 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2017-06-24 00:51:53 +1200 |
commit | dd75e6c043db3b4772d7c318391f8074163c84f4 (patch) | |
tree | 1960dc7196dc61473241ce132b896d23406d2b91 /include | |
parent | d16db3b6926ecfa8b1afff599dd40205d8eecc2b (diff) | |
download | cubeb-dd75e6c043db3b4772d7c318391f8074163c84f4.tar.gz cubeb-dd75e6c043db3b4772d7c318391f8074163c84f4.zip |
Use consistent types for channels, rate, and latency in API.
Chose to use uin32_t because it was the type that is taken by
cubeb_get_max_channel_count, cubeb_get_min_latency, etc.
Diffstat (limited to 'include')
-rw-r--r-- | include/cubeb/cubeb.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h index 4d65229..c5c4a94 100644 --- a/include/cubeb/cubeb.h +++ b/include/cubeb/cubeb.h @@ -33,8 +33,8 @@ extern "C" { cubeb * app_ctx; cubeb_init(&app_ctx, "Example Application"); int rv; - int rate; - int latency_frames; + uint32_t rate; + uint32_t latency_frames; uint64_t ts; rv = cubeb_get_min_latency(app_ctx, &output_params, &latency_frames); @@ -239,8 +239,8 @@ typedef enum { typedef struct { cubeb_sample_format format; /**< Requested sample format. One of #cubeb_sample_format. */ - unsigned int rate; /**< Requested sample rate. Valid range is [1000, 192000]. */ - unsigned int channels; /**< Requested channel count. Valid range is [1, 8]. */ + uint32_t rate; /**< Requested sample rate. Valid range is [1000, 192000]. */ + uint32_t channels; /**< Requested channel count. Valid range is [1, 8]. */ cubeb_channel_layout layout; /**< Requested channel layout. This must be consistent with the provided channels. */ #if defined(__ANDROID__) cubeb_stream_type stream_type; /**< Used to map Android audio stream types */ @@ -348,13 +348,13 @@ typedef struct { cubeb_device_fmt format; /**< Sample format supported. */ cubeb_device_fmt default_format; /**< The default sample format for this device. */ - unsigned int max_channels; /**< Channels. */ - unsigned int default_rate; /**< Default/Preferred sample rate. */ - unsigned int max_rate; /**< Maximum sample rate supported. */ - unsigned int min_rate; /**< Minimum sample rate supported. */ + uint32_t max_channels; /**< Channels. */ + uint32_t default_rate; /**< Default/Preferred sample rate. */ + uint32_t max_rate; /**< Maximum sample rate supported. */ + uint32_t min_rate; /**< Minimum sample rate supported. */ - unsigned int latency_lo; /**< Lowest possible latency in frames. */ - unsigned int latency_hi; /**< Higest possible latency in frames. */ + uint32_t latency_lo; /**< Lowest possible latency in frames. */ + uint32_t latency_hi; /**< Higest possible latency in frames. */ } cubeb_device_info; /** Device collection. @@ -512,7 +512,7 @@ CUBEB_EXPORT int cubeb_stream_init(cubeb * context, cubeb_stream_params * input_stream_params, cubeb_devid output_device, cubeb_stream_params * output_stream_params, - unsigned int latency_frames, + uint32_t latency_frames, cubeb_data_callback data_callback, cubeb_state_callback state_callback, void * user_ptr); |