From 30f285a18e33a5910794765324a048a6febd8c52 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Fri, 3 Jan 2014 08:56:31 +0000 Subject: [PATCH] speed optimization --- android/sound.cpp | 4 ++-- linux/sound.cpp | 4 ++-- mac/sound.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/sound.cpp b/android/sound.cpp index 9d0a614a..ebbdc831 100644 --- a/android/sound.cpp +++ b/android/sound.cpp @@ -226,7 +226,7 @@ int CSound::Init ( const int iNewPrefMonoBufferSize ) void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue, void* instance ) { - CSound* pSound = reinterpret_cast ( instance ); + CSound* pSound = static_cast ( instance ); // only process if we are running if ( !pSound->bRun ) @@ -248,7 +248,7 @@ void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue, void CSound::processOutput ( SLAndroidSimpleBufferQueueItf bufferQueue, void* instance ) { - CSound* pSound = reinterpret_cast ( instance ); + CSound* pSound = static_cast ( instance ); // only process if we are running if ( !pSound->bRun ) diff --git a/linux/sound.cpp b/linux/sound.cpp index 6e1a54d1..d175ba70 100755 --- a/linux/sound.cpp +++ b/linux/sound.cpp @@ -197,7 +197,7 @@ int CSound::Init ( const int /* iNewPrefMonoBufferSize */ ) // JACK callbacks -------------------------------------------------------------- int CSound::process ( jack_nframes_t nframes, void* arg ) { - CSound* pSound = reinterpret_cast ( arg ); + CSound* pSound = static_cast ( arg ); int i; if ( pSound->IsRunning() ) @@ -267,7 +267,7 @@ int CSound::process ( jack_nframes_t nframes, void* arg ) int CSound::bufferSizeCallback ( jack_nframes_t, void *arg ) { - CSound* pSound = reinterpret_cast ( arg ); + CSound* pSound = static_cast ( arg ); pSound->EmitReinitRequestSignal ( RS_ONLY_RESTART_AND_INIT ); diff --git a/mac/sound.cpp b/mac/sound.cpp index e10204d3..8b90b87d 100755 --- a/mac/sound.cpp +++ b/mac/sound.cpp @@ -491,7 +491,7 @@ OSStatus CSound::deviceNotification ( AudioDeviceID, AudioDevicePropertyID inPropertyID, void* inRefCon ) { - CSound* pSound = reinterpret_cast ( inRefCon ); + CSound* pSound = static_cast ( inRefCon ); if ( inPropertyID == kAudioDeviceProcessorOverload ) { @@ -511,7 +511,7 @@ OSStatus CSound::processInput ( void* inRefCon, UInt32 inNumberFrames, AudioBufferList* ) { - CSound* pSound = reinterpret_cast ( inRefCon ); + CSound* pSound = static_cast ( inRefCon ); QMutexLocker locker ( &pSound->Mutex ); @@ -536,7 +536,7 @@ OSStatus CSound::processOutput ( void* inRefCon, UInt32, AudioBufferList* ioData ) { - CSound* pSound = reinterpret_cast ( inRefCon ); + CSound* pSound = static_cast ( inRefCon ); QMutexLocker locker ( &pSound->Mutex );