2 * Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
3 * Copyright (c) 2002-2007, Jerome Duval (jerome.duval@free.fr)
5 * Distributed under the terms of the MIT License.
7 #ifndef MULTI_AUDIO_UTILITY_H
8 #define MULTI_AUDIO_UTILITY_H
11 #include "hmulti_audio.h"
14 namespace MultiAudio
{
16 // sample rate & format conversion
17 float convert_to_sample_rate(uint32 rate
);
18 uint32
convert_from_sample_rate(float rate
);
19 uint32
convert_to_media_format(uint32 format
);
20 int16
convert_to_valid_bits(uint32 format
);
21 uint32
convert_from_media_format(uint32 format
);
22 uint32
select_sample_rate(uint32 rate
);
23 uint32
select_format(uint32 format
);
25 // device driver interface
26 status_t
get_description(int device
, multi_description
* description
);
28 status_t
get_enabled_channels(int device
, multi_channel_enable
* enable
);
29 status_t
set_enabled_channels(int device
, multi_channel_enable
* enable
);
31 status_t
get_global_format(int device
, multi_format_info
* info
);
32 status_t
set_global_format(int device
, multi_format_info
* info
);
33 status_t
get_buffers(int device
, multi_buffer_list
* list
);
34 status_t
buffer_exchange(int device
, multi_buffer_info
* info
);
36 status_t
list_mix_controls(int device
, multi_mix_control_info
* info
);
37 status_t
get_mix(int device
, multi_mix_value_info
* info
);
38 status_t
set_mix(int device
, multi_mix_value_info
* info
);
40 } // namespace MultiAudio
42 #endif // MULTI_AUDIO_UTILITY_H