audio: rewrite IAudioDevice

This commit is contained in:
Liam 2024-02-20 21:17:59 -05:00
parent f5c288e8ae
commit a898ae4f7d
8 changed files with 128 additions and 127 deletions

View file

@ -38,6 +38,10 @@ std::string StringFromBuffer(std::span<const u8> data) {
return std::string(data.begin(), std::find(data.begin(), data.end(), '\0'));
}
std::string StringFromBuffer(std::span<const char> data) {
return std::string(data.begin(), std::find(data.begin(), data.end(), '\0'));
}
// Turns " hej " into "hej". Also handles tabs.
std::string StripSpaces(const std::string& str) {
const std::size_t s = str.find_first_not_of(" \t\r\n");