summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-05-04 21:02:54 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2020-05-04 21:02:54 +0200
commit73c809f616b15cd1eb41c5642ee1242d18275e0d (patch)
tree3d959dcb64307ed7e7be4311dce0e4968e4535f3
parentfix typo (diff)
downloadre3-73c809f616b15cd1eb41c5642ee1242d18275e0d.tar
re3-73c809f616b15cd1eb41c5642ee1242d18275e0d.tar.gz
re3-73c809f616b15cd1eb41c5642ee1242d18275e0d.tar.bz2
re3-73c809f616b15cd1eb41c5642ee1242d18275e0d.tar.lz
re3-73c809f616b15cd1eb41c5642ee1242d18275e0d.tar.xz
re3-73c809f616b15cd1eb41c5642ee1242d18275e0d.tar.zst
re3-73c809f616b15cd1eb41c5642ee1242d18275e0d.zip
-rw-r--r--src/audio/sampman_oal.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index a73bc2bd..6ae1bf79 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -54,7 +54,7 @@ ALuint ALEffect = AL_EFFECT_NULL;
ALuint ALEffectSlot = AL_EFFECTSLOT_NULL;
struct
{
- std::string id;
+ char id[256];
char name[256];
int sources;
}providers[MAXPROVIDERS];
@@ -137,7 +137,7 @@ add_providers()
{
if ( n < MAXPROVIDERS )
{
- providers[n].id=std::string(pDeviceList->GetDeviceName(i), strlen(pDeviceList->GetDeviceName(i)));
+ strcpy(providers[n].id, pDeviceList->GetDeviceName(i));
strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name));
providers[n].sources = pDeviceList->GetMaxNumSources(i);
SampleManager.Set3DProviderName(n, providers[n].name);
@@ -152,7 +152,7 @@ add_providers()
{
if ( n < MAXPROVIDERS )
{
- providers[n].id=std::string(pDeviceList->GetDeviceName(i), strlen(pDeviceList->GetDeviceName(i)));
+ strcpy(providers[n].id, pDeviceList->GetDeviceName(i));
strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name));
strcat(providers[n].name, " EAX");
providers[n].sources = pDeviceList->GetMaxNumSources(i);
@@ -162,7 +162,7 @@ add_providers()
if ( n < MAXPROVIDERS )
{
- providers[n].id=std::string(pDeviceList->GetDeviceName(i), strlen(pDeviceList->GetDeviceName(i)));
+ strcpy(providers[n].id, pDeviceList->GetDeviceName(i));
strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name));
strcat(providers[n].name, " EAX3");
providers[n].sources = pDeviceList->GetMaxNumSources(i);
@@ -263,7 +263,7 @@ set_new_provider(int index)
ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ,0};
- ALDevice = alcOpenDevice(providers[index].id.c_str());
+ ALDevice = alcOpenDevice(providers[index].id);
ASSERT(ALDevice != NULL);
ALContext = alcCreateContext(ALDevice, attr);