summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/aldlist.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-24 13:15:18 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:34:33 +0200
commitb8cf8c53e7d7ff8133906684583536d9015ae803 (patch)
tree1c9a1cb1cb437b607e4a23f28e04f514b8d04ed7 /src/audio/oal/aldlist.h
parentMake sampman stream functions default to stream 0 + type fixes (diff)
downloadre3-b8cf8c53e7d7ff8133906684583536d9015ae803.tar
re3-b8cf8c53e7d7ff8133906684583536d9015ae803.tar.gz
re3-b8cf8c53e7d7ff8133906684583536d9015ae803.tar.bz2
re3-b8cf8c53e7d7ff8133906684583536d9015ae803.tar.lz
re3-b8cf8c53e7d7ff8133906684583536d9015ae803.tar.xz
re3-b8cf8c53e7d7ff8133906684583536d9015ae803.tar.zst
re3-b8cf8c53e7d7ff8133906684583536d9015ae803.zip
Diffstat (limited to '')
-rw-r--r--src/audio/oal/aldlist.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h
index 417bd314..bebb6791 100644
--- a/src/audio/oal/aldlist.h
+++ b/src/audio/oal/aldlist.h
@@ -21,7 +21,7 @@ enum
};
struct ALDEVICEINFO {
- const char *strDeviceName;
+ char *strDeviceName;
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
@@ -33,6 +33,19 @@ struct ALDEVICEINFO {
strDeviceName = NULL;
Extensions = 0;
}
+
+ ~ALDEVICEINFO()
+ {
+ delete[] strDeviceName;
+ strDeviceName = NULL;
+ }
+
+ void SetName(const char *name)
+ {
+ if(strDeviceName) delete[] strDeviceName;
+ strDeviceName = new char[strlen(name) + 1];
+ strcpy(strDeviceName, name);
+ }
};
typedef ALDEVICEINFO *LPALDEVICEINFO;