aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/jack.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 06:23:01 -0800
committerChris Robinson <[email protected]>2018-11-15 06:23:01 -0800
commit7b3a2085aac8eac47f9968f331d3991167793e85 (patch)
tree5566b15f7a90fe8e0fb2b280c4f8b83c80247f4f /Alc/backends/jack.cpp
parentab9f8162b84870161948ddd27d29483206dd4e57 (diff)
Use a regular char* for the device's name
Diffstat (limited to 'Alc/backends/jack.cpp')
-rw-r--r--Alc/backends/jack.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp
index 4aa6cd78..9db75537 100644
--- a/Alc/backends/jack.cpp
+++ b/Alc/backends/jack.cpp
@@ -224,7 +224,7 @@ static int ALCjackPlayback_bufferSizeNotify(jack_nframes_t numframes, void *arg)
device->NumUpdates = 2;
bufsize = device->UpdateSize;
- if(ConfigValueUInt(alstr_get_cstr(device->DeviceName), "jack", "buffer-size", &bufsize))
+ if(ConfigValueUInt(device->DeviceName, "jack", "buffer-size", &bufsize))
bufsize = maxu(NextPowerOf2(bufsize), device->UpdateSize);
device->NumUpdates = (bufsize+device->UpdateSize) / device->UpdateSize;
@@ -368,7 +368,8 @@ static ALCenum ALCjackPlayback_open(ALCjackPlayback *self, const ALCchar *name)
jack_set_process_callback(self->Client, ALCjackPlayback_process, self);
jack_set_buffer_size_callback(self->Client, ALCjackPlayback_bufferSizeNotify, self);
- alstr_copy_cstr(&device->DeviceName, name);
+ al_free(device->DeviceName);
+ device->DeviceName = alstrdup(name);
return ALC_NO_ERROR;
}
@@ -394,7 +395,7 @@ static ALCboolean ALCjackPlayback_reset(ALCjackPlayback *self)
device->NumUpdates = 2;
bufsize = device->UpdateSize;
- if(ConfigValueUInt(alstr_get_cstr(device->DeviceName), "jack", "buffer-size", &bufsize))
+ if(ConfigValueUInt(device->DeviceName, "jack", "buffer-size", &bufsize))
bufsize = maxu(NextPowerOf2(bufsize), device->UpdateSize);
device->NumUpdates = (bufsize+device->UpdateSize) / device->UpdateSize;