File tree Expand file tree Collapse file tree 13 files changed +42
-85
lines changed
target_pulseaudio/roc_sndio Expand file tree Collapse file tree 13 files changed +42
-85
lines changed Original file line number Diff line number Diff line change 15
15
#include " roc_core/atomic.h"
16
16
#include " roc_core/noncopyable.h"
17
17
#include " roc_core/stddefs.h"
18
- #include " roc_sndio/device_state .h"
18
+ #include " roc_sndio/device_defs .h"
19
19
20
20
namespace roc {
21
21
namespace pipeline {
Original file line number Diff line number Diff line change 20
20
#include " roc_core/noncopyable.h"
21
21
#include " roc_core/scoped_ptr.h"
22
22
#include " roc_core/string_list.h"
23
- #include " roc_sndio/device_type .h"
24
- #include " roc_sndio/driver .h"
23
+ #include " roc_sndio/device_defs .h"
24
+ #include " roc_sndio/driver_defs .h"
25
25
#include " roc_sndio/ibackend.h"
26
26
#include " roc_sndio/isink.h"
27
27
#include " roc_sndio/isource.h"
Original file line number Diff line number Diff line change 15
15
#include " roc_core/noncopyable.h"
16
16
#include " roc_core/optional.h"
17
17
#include " roc_core/singleton.h"
18
- #include " roc_sndio/driver .h"
18
+ #include " roc_sndio/driver_defs .h"
19
19
#include " roc_sndio/ibackend.h"
20
20
21
21
#ifdef ROC_TARGET_PULSEAUDIO
Original file line number Diff line number Diff line change 6
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
7
*/
8
8
9
- #include " roc_sndio/device_state .h"
9
+ #include " roc_sndio/device_defs .h"
10
10
11
11
namespace roc {
12
12
namespace sndio {
13
13
14
+ const char * device_type_to_str (DeviceType type) {
15
+ switch (type) {
16
+ case DeviceType_Sink:
17
+ return " sink" ;
18
+
19
+ case DeviceType_Source:
20
+ return " source" ;
21
+ }
22
+
23
+ return " <invalid>" ;
24
+ }
25
+
14
26
const char * device_state_to_str (DeviceState state) {
15
27
switch (state) {
16
28
case DeviceState_Active:
@@ -27,9 +39,6 @@ const char* device_state_to_str(DeviceState state) {
27
39
28
40
case DeviceState_Closed:
29
41
return " closed" ;
30
-
31
- default :
32
- break ;
33
42
}
34
43
35
44
return " <invalid>" ;
Original file line number Diff line number Diff line change 6
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
7
*/
8
8
9
- // ! @file roc_sndio/device_state .h
10
- // ! @brief Device state .
9
+ // ! @file roc_sndio/device_defs .h
10
+ // ! @brief Device definitions .
11
11
12
- #ifndef ROC_SNDIO_DEVICE_STATE_H_
13
- #define ROC_SNDIO_DEVICE_STATE_H_
12
+ #ifndef ROC_SNDIO_DEVICE_DEFS_H_
13
+ #define ROC_SNDIO_DEVICE_DEFS_H_
14
14
15
15
namespace roc {
16
16
namespace sndio {
17
17
18
+ // ! Device type.
19
+ enum DeviceType {
20
+ DeviceType_Sink, // !< Sink.
21
+ DeviceType_Source // !< Source.
22
+ };
23
+
18
24
// ! Device state.
19
25
enum DeviceState {
20
26
// ! Device is running and active.
@@ -38,10 +44,13 @@ enum DeviceState {
38
44
DeviceState_Closed = (1 << 4 )
39
45
};
40
46
47
+ // ! Convert device type to string.
48
+ const char * device_type_to_str (DeviceType type);
49
+
41
50
// ! Convert device state to string.
42
51
const char * device_state_to_str (DeviceState state);
43
52
44
53
} // namespace sndio
45
54
} // namespace roc
46
55
47
- #endif // ROC_SNDIO_DEVICE_STATE_H_
56
+ #endif // ROC_SNDIO_DEVICE_DEFS_H_
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
7
*/
8
8
9
- // ! @file roc_sndio/driver .h
10
- // ! @brief Driver information .
9
+ // ! @file roc_sndio/driver_defs .h
10
+ // ! @brief Driver definitions .
11
11
12
- #ifndef ROC_SNDIO_DRIVER_H_
13
- #define ROC_SNDIO_DRIVER_H_
12
+ #ifndef ROC_SNDIO_DRIVER_DEFS_H_
13
+ #define ROC_SNDIO_DRIVER_DEFS_H_
14
14
15
15
#include " roc_core/panic.h"
16
16
#include " roc_core/stddefs.h"
@@ -115,4 +115,4 @@ struct FormatInfo {
115
115
} // namespace sndio
116
116
} // namespace roc
117
117
118
- #endif // ROC_SNDIO_DRIVER_H_
118
+ #endif // ROC_SNDIO_DRIVER_DEFS_H_
Original file line number Diff line number Diff line change 17
17
#include " roc_core/attributes.h"
18
18
#include " roc_core/iarena.h"
19
19
#include " roc_core/string_list.h"
20
- #include " roc_sndio/device_type .h"
21
- #include " roc_sndio/driver .h"
20
+ #include " roc_sndio/device_defs .h"
21
+ #include " roc_sndio/driver_defs .h"
22
22
#include " roc_sndio/idevice.h"
23
23
#include " roc_sndio/io_config.h"
24
24
#include " roc_status/status_code.h"
Original file line number Diff line number Diff line change 16
16
#include " roc_core/attributes.h"
17
17
#include " roc_core/stddefs.h"
18
18
#include " roc_core/time.h"
19
- #include " roc_sndio/device_state.h"
20
- #include " roc_sndio/device_type.h"
19
+ #include " roc_sndio/device_defs.h"
21
20
#include " roc_status/status_code.h"
22
21
23
22
namespace roc {
You can’t perform that action at this time.
0 commit comments