From 7ef8d11baeaf1847ba7f1df5d858f8cffea9300d Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 12 Aug 2020 21:03:34 +0000 Subject: coding style fixes git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Output/directsound/outputdirectsound.cpp | 9 +-------- src/plugins/Output/directsound/outputdirectsound.h | 14 +++++++------- 2 files changed, 8 insertions(+), 15 deletions(-) (limited to 'src/plugins/Output/directsound') diff --git a/src/plugins/Output/directsound/outputdirectsound.cpp b/src/plugins/Output/directsound/outputdirectsound.cpp index 620b1d38a..1567a4e15 100644 --- a/src/plugins/Output/directsound/outputdirectsound.cpp +++ b/src/plugins/Output/directsound/outputdirectsound.cpp @@ -47,13 +47,6 @@ OutputDirectSound::DSoundChannels OutputDirectSound::m_dsound_pos[10] = { OutputDirectSound::OutputDirectSound() : Output() { - m_ds = nullptr; - m_primaryBuffer = nullptr; - m_dsBuffer = nullptr; - m_dsBufferAt = 0; - m_latency = 0; - m_bytesPerSecond = 0; - m_reset = false; instance = this; } @@ -277,7 +270,7 @@ void OutputDirectSound::resume() HRESULT result = m_dsBuffer->Play(0,0,DSBPLAY_LOOPING); if(result == DSERR_BUFFERLOST) { - result = m_dsBuffer->Play(0,0,DSBPLAY_LOOPING); + m_dsBuffer->Play(0,0,DSBPLAY_LOOPING); m_dsBuffer->Restore(); } } diff --git a/src/plugins/Output/directsound/outputdirectsound.h b/src/plugins/Output/directsound/outputdirectsound.h index 9ee2f878f..21bfadcac 100644 --- a/src/plugins/Output/directsound/outputdirectsound.h +++ b/src/plugins/Output/directsound/outputdirectsound.h @@ -62,10 +62,10 @@ private: void uninitialize(); DWORD bytesToWrite(); - IDirectSound8 *m_ds; - IDirectSoundBuffer *m_primaryBuffer; - IDirectSoundBuffer8 *m_dsBuffer; - DWORD m_dsBufferAt; + IDirectSound8 *m_ds = nullptr; + IDirectSoundBuffer *m_primaryBuffer = nullptr; + IDirectSoundBuffer8 *m_dsBuffer = nullptr; + DWORD m_dsBufferAt = 0; typedef struct { @@ -74,9 +74,9 @@ private: } DSoundChannels; static DSoundChannels m_dsound_pos[10]; - qint64 m_latency; - qint32 m_bytesPerSecond; - bool m_reset; + qint64 m_latency = 0; + qint32 m_bytesPerSecond = 0; + bool m_reset = false; }; /** -- cgit v1.2.3-13-gbd6f