21 hi_assert(_direction == audio_direction::input
or _direction == audio_direction::output);
41 [[
nodiscard]]
static UINT num_devices(audio_direction direction)
noexcept
48 auto num = num_devices(direction);
50 for (
UINT id = 0;
id !=
num; ++id) {
57 for (
auto wave_api : enumerate(direction)) {
62 throw io_error(std::format(
"Could not find matching wave device for end-point-id {}",
end_point_id));
67 audio_direction _direction;
73 auto const result = _direction == audio_direction::input ?
78 throw io_error(std::format(
79 "Could not get win32_wave_api wstring-message {} for wave-device-id:{}:{}",
87 hi_assert(size > 0
and size %
sizeof(
wchar_t) == 0);
88 auto str =
std::wstring(size /
sizeof(
wchar_t) - 1,
wchar_t{});
90 auto const result = _direction == audio_direction::input ?
95 throw io_error(std::format(
96 "Could not get win32_wave_api wstring-message {} for wave-device-id:{}:{}",
message_id, _direction, _id));