summaryrefslogtreecommitdiff
path: root/servers/audio
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-26 11:22:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-27 10:29:48 +0200
commit2b084352b9d2fbbc56414e75bf1091361f8cb496 (patch)
tree9c143cac550a9a1e083f365d75fd9dfacfe55d87 /servers/audio
parent2893b5a6bee1f1185c52d4a46734b2741acbb52c (diff)
Fix warnings on non-static data member initializers (C++11 feature)
We're not formally using C++11 yet so those trigger compilation warnings (at least with GCC 5): ./main/input_default.h:122:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 CursorShape default_shape = CURSOR_ARROW; ^ Note: We may allow those eventually (especially for non-int static const), but most of current occurrences were inconsistent with all other classes. See also http://www.stroustrup.com/C++11FAQ.html#member-init
Diffstat (limited to 'servers/audio')
-rw-r--r--servers/audio/audio_stream.h2
-rw-r--r--servers/audio/effects/audio_effect_record.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index c7763890fc..2740f86d55 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -122,7 +122,7 @@ class AudioStreamPlaybackMicrophone : public AudioStreamPlaybackResampled {
GDCLASS(AudioStreamPlaybackMicrophone, AudioStreamPlayback)
friend class AudioStreamMicrophone;
- const int MICROPHONE_PLAYBACK_DELAY = 256;
+ static const int MICROPHONE_PLAYBACK_DELAY = 256;
bool active;
unsigned int input_ofs;
diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h
index 5f5c7802b4..edf8565c06 100644
--- a/servers/audio/effects/audio_effect_record.h
+++ b/servers/audio/effects/audio_effect_record.h
@@ -49,7 +49,7 @@ class AudioEffectRecordInstance : public AudioEffectInstance {
bool is_recording;
Thread *io_thread;
- bool thread_active = false;
+ bool thread_active;
Vector<AudioFrame> ring_buffer;
Vector<float> recording_data;
@@ -67,6 +67,9 @@ public:
void init();
virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count);
virtual bool process_silence();
+
+ AudioEffectRecordInstance() :
+ thread_active(false) {}
};
class AudioEffectRecord : public AudioEffect {