diff options
Diffstat (limited to 'Alc/backends/alsa.cpp')
-rw-r--r-- | Alc/backends/alsa.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp index 15308632..5a389eab 100644 --- a/Alc/backends/alsa.cpp +++ b/Alc/backends/alsa.cpp @@ -1327,16 +1327,14 @@ static ALCboolean ALCalsaBackendFactory_querySupport(ALCalsaBackendFactory* UNUS return ALC_FALSE; } -static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevProbe type, al_string *outnames) +static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevProbe type, std::string *outnames) { auto add_device = [outnames](const DevMap &entry) -> void { - const char *name{entry.name.c_str()}; - size_t namelen{entry.name.length()}; /* +1 to also append the null char (to ensure a null-separated list and * double-null terminated list). */ - alstr_append_range(outnames, name, name + namelen+1); + outnames->append(entry.name.c_str(), entry.name.length()+1); }; switch(type) { |