diff options
author | ZuBsPaCe <kurt.rudin@gmx.net> | 2015-10-03 00:38:43 +0200 |
---|---|---|
committer | ZuBsPaCe <kurt.rudin@gmx.net> | 2015-10-03 00:38:43 +0200 |
commit | c69afe49488d81909495f6cef487fb369bf31f49 (patch) | |
tree | 462c800296e3187c4c47373d157e525ec4586a06 /drivers/opus | |
parent | 5ddbef135134720b52ee8c07db5f8460980ae6fe (diff) |
Fixes following Visual Studio 2013 compile error on windows:
audio_stream_opus.h(57) : error C2864: 'AudioStreamPlaybackOpus::osrate' : a static data member with an in-class initializer must have non-volatile const integral type
See: http://stackoverflow.com/questions/2454019/why-arent-static-const-floats-allowed
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 |
2 files changed, 3 insertions, 1 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; |