diff options
author | Chris Robinson <[email protected]> | 2018-11-15 04:24:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-15 04:24:33 -0800 |
commit | 1971d0f5c6c94b250f4b3e29bdfa95c836f900bc (patch) | |
tree | b3af8bbd22fe26ad4db683214911897fae767ae3 /Alc/backends/sndio.cpp | |
parent | d4f64b9e29319f56f2ecab1291918a52ec8336f1 (diff) |
Use std::string instead of al_string for enumerating
Diffstat (limited to 'Alc/backends/sndio.cpp')
-rw-r--r-- | Alc/backends/sndio.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/backends/sndio.cpp b/Alc/backends/sndio.cpp index 818e107c..c97226a6 100644 --- a/Alc/backends/sndio.cpp +++ b/Alc/backends/sndio.cpp @@ -544,7 +544,7 @@ ALCbackendFactory *SndioBackendFactory_getFactory(void); static ALCboolean SndioBackendFactory_init(SndioBackendFactory *self); static DECLARE_FORWARD(SndioBackendFactory, ALCbackendFactory, void, deinit) static ALCboolean SndioBackendFactory_querySupport(SndioBackendFactory *self, ALCbackend_Type type); -static void SndioBackendFactory_probe(SndioBackendFactory *self, enum DevProbe type, al_string *outnames); +static void SndioBackendFactory_probe(SndioBackendFactory *self, enum DevProbe type, std::string *outnames); static ALCbackend* SndioBackendFactory_createBackend(SndioBackendFactory *self, ALCdevice *device, ALCbackend_Type type); DEFINE_ALCBACKENDFACTORY_VTABLE(SndioBackendFactory); @@ -571,13 +571,14 @@ static ALCboolean SndioBackendFactory_querySupport(SndioBackendFactory* UNUSED(s return ALC_FALSE; } -static void SndioBackendFactory_probe(SndioBackendFactory* UNUSED(self), enum DevProbe type, al_string *outnames) +static void SndioBackendFactory_probe(SndioBackendFactory* UNUSED(self), enum DevProbe type, std::string *outnames) { switch(type) { case ALL_DEVICE_PROBE: case CAPTURE_DEVICE_PROBE: - alstr_append_range(outnames, sndio_device, sndio_device+sizeof(sndio_device)); + /* Includes null char. */ + outnames->append(sndio_device, sizeof(sndio_device)); break; } } |