diff options
author | punto- <ariel@okamstudio.com> | 2015-10-08 12:22:25 -0300 |
---|---|---|
committer | punto- <ariel@okamstudio.com> | 2015-10-08 12:22:25 -0300 |
commit | a9e68df493292b943240454d0a9b983b1cd82429 (patch) | |
tree | 3f7684ad7368267890394e577a42465003d2b3ef /drivers/opus | |
parent | 5ddbef135134720b52ee8c07db5f8460980ae6fe (diff) | |
parent | d99727d099a3fb689b7828742f659e95f920fb07 (diff) |
Merge pull request #2564 from ZuBsPaCe/opus-support-vs2013
Fixes Visual Studio 2013 compile errors due to Opus
Diffstat (limited to 'drivers/opus')
-rw-r--r-- | drivers/opus/audio_stream_opus.cpp | 2 | ||||
-rw-r--r-- | drivers/opus/audio_stream_opus.h | 2 | ||||
-rw-r--r-- | drivers/opus/opus_config.h | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/opus/audio_stream_opus.cpp b/drivers/opus/audio_stream_opus.cpp index be31420453..eb9c81e152 100644 --- a/drivers/opus/audio_stream_opus.cpp +++ b/drivers/opus/audio_stream_opus.cpp @@ -30,6 +30,8 @@ /*************************************************************************/ #include "audio_stream_opus.h" +const float AudioStreamPlaybackOpus::osrate=48000.0f; + int AudioStreamPlaybackOpus::_op_read_func(void *_stream, unsigned char *_ptr, int _nbytes) { FileAccess *fa=(FileAccess*)_stream; diff --git a/drivers/opus/audio_stream_opus.h b/drivers/opus/audio_stream_opus.h index 5bb838cd31..2f173cc270 100644 --- a/drivers/opus/audio_stream_opus.h +++ b/drivers/opus/audio_stream_opus.h @@ -54,7 +54,7 @@ class AudioStreamPlaybackOpus : public AudioStreamPlayback { static int _op_seek_func(void *_stream, opus_int64 _offset, int _whence); static int _op_close_func(void *_stream); static opus_int64 _op_tell_func(void *_stream); - static const float osrate=48000.0f; + static const float osrate; String file; int64_t frames_mixed; diff --git a/drivers/opus/opus_config.h b/drivers/opus/opus_config.h index e75550409f..c6470e92c3 100644 --- a/drivers/opus/opus_config.h +++ b/drivers/opus/opus_config.h @@ -91,8 +91,13 @@ /* This is a build of OPUS */ #define OPUS_BUILD /**/ -/* Use C99 variable-size arrays */ -#define VAR_ARRAYS 1 +#ifndef WIN32 + /* Use C99 variable-size arrays */ + #define VAR_ARRAYS 1 +#else + /* Fixes VS 2013 compile error */ + #define USE_ALLOCA 1 +#endif /* Define to `__inline__' or `__inline' if that's what the C compiler |