diff options
author | Paul ADENOT <[email protected]> | 2013-10-17 17:08:51 +0200 |
---|---|---|
committer | Paul ADENOT <[email protected]> | 2013-10-17 17:08:51 +0200 |
commit | 5bc8aaa883d842db117ccc6e8102406669d43204 (patch) | |
tree | 4212af3b804d41bf28006cf09a49a3d1df20e7bd /src/cubeb_sndio.c | |
parent | 1b8702d0003f93b24974432ab667bee2ed4b041f (diff) | |
download | cubeb-5bc8aaa883d842db117ccc6e8102406669d43204.tar.gz cubeb-5bc8aaa883d842db117ccc6e8102406669d43204.zip |
Mozilla Bug 918861
Add an API to get the native samplerate for a given audio backend.
Diffstat (limited to 'src/cubeb_sndio.c')
-rw-r--r-- | src/cubeb_sndio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cubeb_sndio.c b/src/cubeb_sndio.c index c45997b..636f231 100644 --- a/src/cubeb_sndio.c +++ b/src/cubeb_sndio.c @@ -259,6 +259,15 @@ sndio_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) } static int +sndio_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) +{ + // XXX Not yet implemented. + *rate = 44100; + + return CUBEB_OK; +} + +static int sndio_get_min_latency(cubeb * ctx, cubeb_stream_params params, uint32_t * latency_ms) { // XXX Not yet implemented. @@ -337,6 +346,7 @@ static struct cubeb_ops const sndio_ops = { .get_backend_id = sndio_get_backend_id, .get_max_channel_count = sndio_get_max_channel_count, .get_min_latency = sndio_get_min_latency, + .get_preferred_sample_rate = sndio_get_preferred_sample_rate, .destroy = sndio_destroy, .stream_init = sndio_stream_init, .stream_destroy = sndio_stream_destroy, |