aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/bs2b.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-22 06:49:37 -0800
committerChris Robinson <[email protected]>2018-11-22 06:49:37 -0800
commit9d73e03aaa6d51d6b787b0d576760f782fc3394f (patch)
tree5fa306fa15d385db3d72098ac870dcd204b4ce7b /OpenAL32/Include/bs2b.h
parentb3b42201828bb737c55c20bd46af10b40d10ef85 (diff)
Use unique_ptr for bs2b
Diffstat (limited to 'OpenAL32/Include/bs2b.h')
-rw-r--r--OpenAL32/Include/bs2b.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/OpenAL32/Include/bs2b.h b/OpenAL32/Include/bs2b.h
index 13cdf9a6..e235e765 100644
--- a/OpenAL32/Include/bs2b.h
+++ b/OpenAL32/Include/bs2b.h
@@ -24,6 +24,8 @@
#ifndef BS2B_H
#define BS2B_H
+#include "almalloc.h"
+
/* Number of crossfeed levels */
#define BS2B_CLEVELS 3
@@ -42,10 +44,6 @@
/* Default sample rate (Hz) */
#define BS2B_DEFAULT_SRATE 44100
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
struct bs2b {
int level; /* Crossfeed level */
int srate; /* Sample rate (Hz) */
@@ -67,6 +65,8 @@ struct bs2b {
float lo;
float hi;
} last_sample[2];
+
+ DEF_NEWDEL(bs2b)
};
/* Clear buffers and set new coefficients with new crossfeed level and sample
@@ -74,21 +74,17 @@ struct bs2b {
* level - crossfeed level of *LEVEL values.
* srate - sample rate by Hz.
*/
-void bs2b_set_params(struct bs2b *bs2b, int level, int srate);
+void bs2b_set_params(bs2b *bs2b, int level, int srate);
/* Return current crossfeed level value */
-int bs2b_get_level(struct bs2b *bs2b);
+int bs2b_get_level(bs2b *bs2b);
/* Return current sample rate value */
-int bs2b_get_srate(struct bs2b *bs2b);
+int bs2b_get_srate(bs2b *bs2b);
/* Clear buffer */
-void bs2b_clear(struct bs2b *bs2b);
-
-void bs2b_cross_feed(struct bs2b *bs2b, float *RESTRICT Left, float *RESTRICT Right, int SamplesToDo);
+void bs2b_clear(bs2b *bs2b);
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
+void bs2b_cross_feed(bs2b *bs2b, float *RESTRICT Left, float *RESTRICT Right, int SamplesToDo);
#endif /* BS2B_H */