diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-06-19 15:21:13 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-06-19 15:21:13 +0400 |
commit | 78b471b621a14914b6b3f6604a52b7584bd96b0f (patch) | |
tree | 15ca28c430bdbe392013a7cdb86aa33c41a73ea2 | |
parent | 1bd92ab93dca14abd6d5ecead309d6c198912ac5 (diff) |
change DOUBLE to double for consistency
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5192 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r-- | src/filters/renderer/SyncClock/Interfaces.h | 6 | ||||
-rw-r--r-- | src/filters/renderer/SyncClock/SyncClock.cpp | 8 | ||||
-rw-r--r-- | src/filters/renderer/SyncClock/SyncClock.h | 10 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/SyncRenderer.cpp | 16 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/SyncRenderer.h | 36 |
5 files changed, 38 insertions, 38 deletions
diff --git a/src/filters/renderer/SyncClock/Interfaces.h b/src/filters/renderer/SyncClock/Interfaces.h index 74b6340fb..b5f20389a 100644 --- a/src/filters/renderer/SyncClock/Interfaces.h +++ b/src/filters/renderer/SyncClock/Interfaces.h @@ -28,8 +28,8 @@ MIDL_INTERFACE("A62888FB-8E37-44d2-8850-B3E3F2C1169F") ISyncClock:
public IUnknown {
public:
- virtual HRESULT STDMETHODCALLTYPE AdjustClock(DOUBLE adjustment) = 0;
- virtual HRESULT STDMETHODCALLTYPE SetBias(DOUBLE bias) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetBias(DOUBLE * bias) = 0;
+ virtual HRESULT STDMETHODCALLTYPE AdjustClock(double adjustment) = 0;
+ virtual HRESULT STDMETHODCALLTYPE SetBias(double bias) = 0;
+ virtual HRESULT STDMETHODCALLTYPE GetBias(double * bias) = 0;
virtual HRESULT STDMETHODCALLTYPE GetStartTime(REFERENCE_TIME * startTime);
};
diff --git a/src/filters/renderer/SyncClock/SyncClock.cpp b/src/filters/renderer/SyncClock/SyncClock.cpp index 6618e85fb..1e757637f 100644 --- a/src/filters/renderer/SyncClock/SyncClock.cpp +++ b/src/filters/renderer/SyncClock/SyncClock.cpp @@ -33,19 +33,19 @@ CSyncClockFilter::~CSyncClockFilter() {
}
-STDMETHODIMP CSyncClockFilter::AdjustClock(DOUBLE adjustment)
+STDMETHODIMP CSyncClockFilter::AdjustClock(double adjustment)
{
m_Clock.adjustment = adjustment;
return S_OK;
}
-STDMETHODIMP CSyncClockFilter::SetBias(DOUBLE bias)
+STDMETHODIMP CSyncClockFilter::SetBias(double bias)
{
m_Clock.bias = bias;
return S_OK;
}
-STDMETHODIMP CSyncClockFilter::GetBias(DOUBLE* bias)
+STDMETHODIMP CSyncClockFilter::GetBias(double* bias)
{
*bias = m_Clock.bias;
return S_OK;
@@ -103,7 +103,7 @@ REFERENCE_TIME CSyncClock::GetPrivateTime() // We ignore that rtTime may wrap around. Not gonna happen too often
m_rtPrevTime = rtTime;
- delta = (REFERENCE_TIME)((DOUBLE)delta * adjustment * bias);
+ delta = (REFERENCE_TIME)((double)delta * adjustment * bias);
m_rtPrivateTime = m_rtPrivateTime + delta;
return m_rtPrivateTime;
}
diff --git a/src/filters/renderer/SyncClock/SyncClock.h b/src/filters/renderer/SyncClock/SyncClock.h index b89f03d64..a8ced4ce8 100644 --- a/src/filters/renderer/SyncClock/SyncClock.h +++ b/src/filters/renderer/SyncClock/SyncClock.h @@ -36,8 +36,8 @@ public: REFERENCE_TIME GetPrivateTime();
IUnknown* pUnk() { return static_cast<IUnknown*>(static_cast<IReferenceClock*>(this)); }
- DOUBLE adjustment; // For adjusting speed temporarily
- DOUBLE bias; // For changing speed permanently
+ double adjustment; // For adjusting speed temporarily
+ double bias; // For changing speed permanently
private:
REFERENCE_TIME m_rtPrivateTime;
@@ -60,9 +60,9 @@ public: STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
// ISyncClock
- STDMETHODIMP AdjustClock(DOUBLE adjustment);
- STDMETHODIMP SetBias(DOUBLE bias);
- STDMETHODIMP GetBias(DOUBLE* bias);
+ STDMETHODIMP AdjustClock(double adjustment);
+ STDMETHODIMP SetBias(double bias);
+ STDMETHODIMP GetBias(double* bias);
STDMETHODIMP GetStartTime(REFERENCE_TIME* startTime);
// CBaseFilter methods
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp index 0bb28cb53..00fed2ae6 100644 --- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp +++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp @@ -4141,7 +4141,7 @@ STDMETHODIMP CSyncRenderer::NonDelegatingQueryInterface(REFIID riid, void** ppv) return SUCCEEDED(hr) ? hr : __super::NonDelegatingQueryInterface(riid, ppv);
}
-CGenlock::CGenlock(DOUBLE target, DOUBLE limit, int lineD, int colD, DOUBLE clockD, UINT mon):
+CGenlock::CGenlock(double target, double limit, int lineD, int colD, double clockD, UINT mon):
targetSyncOffset(target), // Target sync offset, typically around 10 ms
controlLimit(limit), // How much sync offset is allowed to drift from target sync offset before control kicks in
lineDelta(lineD), // Number of rows used in display frequency adjustment, typically 1 (one)
@@ -4268,9 +4268,9 @@ HRESULT CGenlock::GetTiming() totalColumns = displayTiming[HACTIVE] + displayTiming[HFRONTPORCH] + displayTiming[HSYNCWIDTH] + displayTiming[HBACKPORCH];
totalLines = displayTiming[VACTIVE] + displayTiming[VFRONTPORCH] + displayTiming[VSYNCWIDTH] + displayTiming[VBACKPORCH];
pixelClock = 1000 * displayTiming[PIXELCLOCK]; // Pixels/s
- displayFreqCruise = (DOUBLE)pixelClock / (totalLines * totalColumns); // Frames/s
- displayFreqSlower = (DOUBLE)pixelClock / ((totalLines + lineDelta) * (totalColumns + columnDelta));
- displayFreqFaster = (DOUBLE)pixelClock / ((totalLines - lineDelta) * (totalColumns - columnDelta));
+ displayFreqCruise = (double)pixelClock / (totalLines * totalColumns); // Frames/s
+ displayFreqSlower = (double)pixelClock / ((totalLines + lineDelta) * (totalColumns + columnDelta));
+ displayFreqFaster = (double)pixelClock / ((totalLines - lineDelta) * (totalColumns - columnDelta));
curDisplayFreq = displayFreqCruise;
GlobalDeleteAtom(getTiming);
adjDelta = 0;
@@ -4313,7 +4313,7 @@ HRESULT CGenlock::ResetClock() }
}
-HRESULT CGenlock::SetTargetSyncOffset(DOUBLE targetD)
+HRESULT CGenlock::SetTargetSyncOffset(double targetD)
{
targetSyncOffset = targetD;
lowSyncOffset = targetD - controlLimit;
@@ -4321,19 +4321,19 @@ HRESULT CGenlock::SetTargetSyncOffset(DOUBLE targetD) return S_OK;
}
-HRESULT CGenlock::GetTargetSyncOffset(DOUBLE* targetD)
+HRESULT CGenlock::GetTargetSyncOffset(double* targetD)
{
*targetD = targetSyncOffset;
return S_OK;
}
-HRESULT CGenlock::SetControlLimit(DOUBLE cL)
+HRESULT CGenlock::SetControlLimit(double cL)
{
controlLimit = cL;
return S_OK;
}
-HRESULT CGenlock::GetControlLimit(DOUBLE* cL)
+HRESULT CGenlock::GetControlLimit(double* cL)
{
*cL = controlLimit;
return S_OK;
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.h b/src/filters/renderer/VideoRenderers/SyncRenderer.h index 9cd251d8e..1cf343657 100644 --- a/src/filters/renderer/VideoRenderers/SyncRenderer.h +++ b/src/filters/renderer/VideoRenderers/SyncRenderer.h @@ -619,17 +619,17 @@ namespace GothSync double sum;
};
- CGenlock(DOUBLE target, DOUBLE limit, int rowD, int colD, DOUBLE clockD, UINT mon);
+ CGenlock(double target, double limit, int rowD, int colD, double clockD, UINT mon);
~CGenlock();
BOOL PowerstripRunning(); // TRUE if PowerStrip is running
HRESULT GetTiming(); // Get the string representing the display's current timing parameters
HRESULT ResetTiming(); // Reset timing to what was last registered by GetTiming()
HRESULT ResetClock(); // Reset reference clock speed to nominal
- HRESULT SetTargetSyncOffset(DOUBLE targetD);
- HRESULT GetTargetSyncOffset(DOUBLE* targetD);
- HRESULT SetControlLimit(DOUBLE cL);
- HRESULT GetControlLimit(DOUBLE* cL);
+ HRESULT SetTargetSyncOffset(double targetD);
+ HRESULT GetTargetSyncOffset(double* targetD);
+ HRESULT SetControlLimit(double cL);
+ HRESULT GetControlLimit(double* cL);
HRESULT SetDisplayResolution(UINT columns, UINT lines);
HRESULT AdviseSyncClock(ISyncClock* sC);
HRESULT SetMonitor(UINT mon); // Set the number of the monitor to synchronize
@@ -644,7 +644,7 @@ namespace GothSync int adjDelta; // -1 for display slower in relation to video, 0 for keep, 1 for faster
int lineDelta; // The number of rows added or subtracted when adjusting display fps
int columnDelta; // The number of colums added or subtracted when adjusting display fps
- DOUBLE cycleDelta; // Adjustment factor for cycle time as fraction of nominal value
+ double cycleDelta; // Adjustment factor for cycle time as fraction of nominal value
UINT displayAdjustmentsMade; // The number of adjustments made to display refresh rate
UINT clockAdjustmentsMade; // The number of adjustments made to clock frequency
@@ -652,17 +652,17 @@ namespace GothSync UINT visibleLines, visibleColumns; // The nominal resolution
MovingAverage* syncOffsetFifo;
MovingAverage* frameCycleFifo;
- DOUBLE minSyncOffset, maxSyncOffset;
- DOUBLE syncOffsetAvg; // Average of the above
- DOUBLE minFrameCycle, maxFrameCycle;
- DOUBLE frameCycleAvg;
+ double minSyncOffset, maxSyncOffset;
+ double syncOffsetAvg; // Average of the above
+ double minFrameCycle, maxFrameCycle;
+ double frameCycleAvg;
UINT pixelClock; // In pixels/s
- DOUBLE displayFreqCruise; // Nominal display frequency in frames/s
- DOUBLE displayFreqSlower;
- DOUBLE displayFreqFaster;
- DOUBLE curDisplayFreq; // Current (adjusted) display frequency
- DOUBLE controlLimit; // How much the sync offset is allowed to drift from target sync offset
+ double displayFreqCruise; // Nominal display frequency in frames/s
+ double displayFreqSlower;
+ double displayFreqFaster;
+ double curDisplayFreq; // Current (adjusted) display frequency
+ double controlLimit; // How much the sync offset is allowed to drift from target sync offset
WPARAM monitor; // The monitor to be controlled. 0-based.
CComPtr<ISyncClock> syncClock; // Interface to an adjustable reference clock
@@ -676,9 +676,9 @@ namespace GothSync TCHAR cruise[MAX_LOADSTRING]; // String corresponding to nominal display frequency
TCHAR slower[MAX_LOADSTRING]; // String corresponding to slower display frequency
TCHAR savedTiming[MAX_LOADSTRING]; // String version of saved timing (to be restored upon exit)
- DOUBLE lowSyncOffset; // The closest we want to let the scheduled render time to get to the next vsync. In % of the frame time
- DOUBLE targetSyncOffset; // Where we want the scheduled render time to be in relation to the next vsync
- DOUBLE highSyncOffset; // The furthers we want to let the scheduled render time to get to the next vsync
+ double lowSyncOffset; // The closest we want to let the scheduled render time to get to the next vsync. In % of the frame time
+ double targetSyncOffset; // Where we want the scheduled render time to be in relation to the next vsync
+ double highSyncOffset; // The furthers we want to let the scheduled render time to get to the next vsync
CCritSec csGenlockLock;
};
}
|