speed optimization
This commit is contained in:
parent
6e49e4e92c
commit
30f285a18e
3 changed files with 7 additions and 7 deletions
|
@ -226,7 +226,7 @@ int CSound::Init ( const int iNewPrefMonoBufferSize )
|
||||||
void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue,
|
void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue,
|
||||||
void* instance )
|
void* instance )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( instance );
|
CSound* pSound = static_cast<CSound*> ( instance );
|
||||||
|
|
||||||
// only process if we are running
|
// only process if we are running
|
||||||
if ( !pSound->bRun )
|
if ( !pSound->bRun )
|
||||||
|
@ -248,7 +248,7 @@ void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue,
|
||||||
void CSound::processOutput ( SLAndroidSimpleBufferQueueItf bufferQueue,
|
void CSound::processOutput ( SLAndroidSimpleBufferQueueItf bufferQueue,
|
||||||
void* instance )
|
void* instance )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( instance );
|
CSound* pSound = static_cast<CSound*> ( instance );
|
||||||
|
|
||||||
// only process if we are running
|
// only process if we are running
|
||||||
if ( !pSound->bRun )
|
if ( !pSound->bRun )
|
||||||
|
|
|
@ -197,7 +197,7 @@ int CSound::Init ( const int /* iNewPrefMonoBufferSize */ )
|
||||||
// JACK callbacks --------------------------------------------------------------
|
// JACK callbacks --------------------------------------------------------------
|
||||||
int CSound::process ( jack_nframes_t nframes, void* arg )
|
int CSound::process ( jack_nframes_t nframes, void* arg )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( arg );
|
CSound* pSound = static_cast<CSound*> ( arg );
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ( pSound->IsRunning() )
|
if ( pSound->IsRunning() )
|
||||||
|
@ -267,7 +267,7 @@ int CSound::process ( jack_nframes_t nframes, void* arg )
|
||||||
|
|
||||||
int CSound::bufferSizeCallback ( jack_nframes_t, void *arg )
|
int CSound::bufferSizeCallback ( jack_nframes_t, void *arg )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( arg );
|
CSound* pSound = static_cast<CSound*> ( arg );
|
||||||
|
|
||||||
pSound->EmitReinitRequestSignal ( RS_ONLY_RESTART_AND_INIT );
|
pSound->EmitReinitRequestSignal ( RS_ONLY_RESTART_AND_INIT );
|
||||||
|
|
||||||
|
|
|
@ -491,7 +491,7 @@ OSStatus CSound::deviceNotification ( AudioDeviceID,
|
||||||
AudioDevicePropertyID inPropertyID,
|
AudioDevicePropertyID inPropertyID,
|
||||||
void* inRefCon )
|
void* inRefCon )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( inRefCon );
|
CSound* pSound = static_cast<CSound*> ( inRefCon );
|
||||||
|
|
||||||
if ( inPropertyID == kAudioDeviceProcessorOverload )
|
if ( inPropertyID == kAudioDeviceProcessorOverload )
|
||||||
{
|
{
|
||||||
|
@ -511,7 +511,7 @@ OSStatus CSound::processInput ( void* inRefCon,
|
||||||
UInt32 inNumberFrames,
|
UInt32 inNumberFrames,
|
||||||
AudioBufferList* )
|
AudioBufferList* )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( inRefCon );
|
CSound* pSound = static_cast<CSound*> ( inRefCon );
|
||||||
|
|
||||||
QMutexLocker locker ( &pSound->Mutex );
|
QMutexLocker locker ( &pSound->Mutex );
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ OSStatus CSound::processOutput ( void* inRefCon,
|
||||||
UInt32,
|
UInt32,
|
||||||
AudioBufferList* ioData )
|
AudioBufferList* ioData )
|
||||||
{
|
{
|
||||||
CSound* pSound = reinterpret_cast<CSound*> ( inRefCon );
|
CSound* pSound = static_cast<CSound*> ( inRefCon );
|
||||||
|
|
||||||
QMutexLocker locker ( &pSound->Mutex );
|
QMutexLocker locker ( &pSound->Mutex );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue