summaryrefslogtreecommitdiff
path: root/src/audio/oal/stream.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-22 14:56:28 +0300
committereray orçunus <erayorcunus@gmail.com>2020-07-24 20:26:33 +0300
commit732b7608299b1bbe40d65088498d9b37ab7d9265 (patch)
treeee2e85916ffadc40bc0564348ac5041196cbf28a /src/audio/oal/stream.cpp
parent8117bcb56f00882c6cf4056431e82c9b7ef23308 (diff)
64-bit on Windows
Diffstat (limited to 'src/audio/oal/stream.cpp')
-rw-r--r--src/audio/oal/stream.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp
index 0378c07c..40ec57fa 100644
--- a/src/audio/oal/stream.cpp
+++ b/src/audio/oal/stream.cpp
@@ -5,7 +5,11 @@
#include "sampman.h"
#ifdef _WIN32
+
+// TODO: This is due to version difference of 32-bit libmpg123 and 64-bit libmpg123, fix it
+#ifndef _WIN64
typedef long ssize_t;
+#endif
#pragma comment( lib, "libsndfile-1.lib" )
#pragma comment( lib, "libmpg123.lib" )
#else
@@ -173,8 +177,11 @@ public:
size_t size;
int err = mpg123_read(m_pMH, (unsigned char *)buffer, GetBufferSize(), &size);
+#if defined(__LP64__) || defined(_WIN64)
+ assert("We can't handle audio files more then 2 GB yet :shrug:" && (size < UINT32_MAX));
+#endif
if (err != MPG123_OK && err != MPG123_DONE) return 0;
- return size;
+ return (uint32)size;
}
};