Merge pull request #2564 from ZuBsPaCe/opus-support-vs2013
Fixes Visual Studio 2013 compile errors due to Opus
This commit is contained in:
commit
a9e68df493
@ -30,6 +30,8 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "audio_stream_opus.h"
|
#include "audio_stream_opus.h"
|
||||||
|
|
||||||
|
const float AudioStreamPlaybackOpus::osrate=48000.0f;
|
||||||
|
|
||||||
int AudioStreamPlaybackOpus::_op_read_func(void *_stream, unsigned char *_ptr, int _nbytes) {
|
int AudioStreamPlaybackOpus::_op_read_func(void *_stream, unsigned char *_ptr, int _nbytes) {
|
||||||
FileAccess *fa=(FileAccess*)_stream;
|
FileAccess *fa=(FileAccess*)_stream;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class AudioStreamPlaybackOpus : public AudioStreamPlayback {
|
|||||||
static int _op_seek_func(void *_stream, opus_int64 _offset, int _whence);
|
static int _op_seek_func(void *_stream, opus_int64 _offset, int _whence);
|
||||||
static int _op_close_func(void *_stream);
|
static int _op_close_func(void *_stream);
|
||||||
static opus_int64 _op_tell_func(void *_stream);
|
static opus_int64 _op_tell_func(void *_stream);
|
||||||
static const float osrate=48000.0f;
|
static const float osrate;
|
||||||
|
|
||||||
String file;
|
String file;
|
||||||
int64_t frames_mixed;
|
int64_t frames_mixed;
|
||||||
|
@ -91,8 +91,13 @@
|
|||||||
/* This is a build of OPUS */
|
/* This is a build of OPUS */
|
||||||
#define OPUS_BUILD /**/
|
#define OPUS_BUILD /**/
|
||||||
|
|
||||||
/* Use C99 variable-size arrays */
|
#ifndef WIN32
|
||||||
#define VAR_ARRAYS 1
|
/* 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
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
|
Loading…
Reference in New Issue
Block a user