diff options
Diffstat (limited to 'core/device.h')
-rw-r--r-- | core/device.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/device.h b/core/device.h index bc6bae52..4cc822cc 100644 --- a/core/device.h +++ b/core/device.h @@ -271,4 +271,20 @@ struct DeviceBase { DISABLE_ALLOC() }; + +/* Must be less than 15 characters (16 including terminating null) for + * compatibility with pthread_setname_np limitations. */ +#define MIXER_THREAD_NAME "alsoft-mixer" + +#define RECORD_THREAD_NAME "alsoft-record" + + +/** + * Returns the index for the given channel name (e.g. FrontCenter), or + * INVALID_CHANNEL_INDEX if it doesn't exist. + */ +inline uint GetChannelIdxByName(const RealMixParams &real, Channel chan) noexcept +{ return real.ChannelIndex[chan]; } +#define INVALID_CHANNEL_INDEX ~0u + #endif /* CORE_DEVICE_H */ |