AudioFlinger: Fix VolumeShaper initialization for DirectOutputThread
Avoids temporary frequent polling after creation.
Offload not affected.
Test: compile
Change-Id: I868a80ee25553c16083510ef6b79782c414a39a1
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index aab7601..8b8222c 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -1205,7 +1205,9 @@
public:
DirectOutputThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output,
- audio_io_handle_t id, audio_devices_t device, bool systemReady);
+ audio_io_handle_t id, audio_devices_t device, bool systemReady)
+ : DirectOutputThread(audioFlinger, output, id, device, DIRECT, systemReady) { }
+
virtual ~DirectOutputThread();
status_t selectPresentation(int presentationId, int programId);
@@ -1231,10 +1233,10 @@
virtual void onAddNewTrack_l();
- bool mVolumeShaperActive;
+ bool mVolumeShaperActive = false;
DirectOutputThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output,
- audio_io_handle_t id, uint32_t device, ThreadBase::type_t type,
+ audio_io_handle_t id, audio_devices_t device, ThreadBase::type_t type,
bool systemReady);
void processVolume_l(Track *track, bool lastTrack);