Cleanup.
This commit is contained in:
@@ -68,8 +68,8 @@ CString RageSound_CA::Init()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mOutputDevice->AddPropertyListener(kAudioPropertyWildcardChannel,
|
mOutputDevice->AddPropertyListener( kAudioPropertyWildcardChannel, kAudioPropertyWildcardSection,
|
||||||
kAudioPropertyWildcardSection, kAudioDeviceProcessorOverload, OverloadListener, this);
|
kAudioDeviceProcessorOverload, OverloadListener, this );
|
||||||
}
|
}
|
||||||
catch( const CAException& e )
|
catch( const CAException& e )
|
||||||
{
|
{
|
||||||
@@ -80,9 +80,8 @@ CString RageSound_CA::Init()
|
|||||||
// XXX should this be nominalSampleRate or not?
|
// XXX should this be nominalSampleRate or not?
|
||||||
Desc IOProcFormat( nominalSampleRate, kAudioFormatLinearPCM, 8, 1, 8, 2, 32,
|
Desc IOProcFormat( nominalSampleRate, kAudioFormatLinearPCM, 8, 1, 8, 2, 32,
|
||||||
kAudioFormatFlagsNativeFloatPacked);
|
kAudioFormatFlagsNativeFloatPacked);
|
||||||
const Desc SMFormat(44100.0, kAudioFormatLinearPCM, kBytesPerPacket,
|
const Desc SMFormat( 44100.0, kAudioFormatLinearPCM, kBytesPerPacket, kFramesPerPacket, kBytesPerFrame,
|
||||||
kFramesPerPacket, kBytesPerFrame, kChannelsPerFrame,
|
kChannelsPerFrame, kBitsPerChannel, kFormatFlags );
|
||||||
kBitsPerChannel, kFormatFlags);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -119,7 +118,9 @@ CString RageSound_CA::Init()
|
|||||||
LOG->Info( "Frames of stream latency: %lu", t );
|
LOG->Info( "Frames of stream latency: %lu", t );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
LOG->Warn( "Stream reports no latency." );
|
LOG->Warn( "Stream reports no latency." );
|
||||||
|
}
|
||||||
mLatency = frames / 44100.0;
|
mLatency = frames / 44100.0;
|
||||||
LOG->Info( "Frames of latency: %lu\n"
|
LOG->Info( "Frames of latency: %lu\n"
|
||||||
"Seconds of latency: %f", frames, mLatency );
|
"Seconds of latency: %f", frames, mLatency );
|
||||||
@@ -224,8 +225,7 @@ void RageSound_CA::SetupDecodingThread()
|
|||||||
THREAD_PRECEDENCE_POLICY, (int *)&po,
|
THREAD_PRECEDENCE_POLICY, (int *)&po,
|
||||||
THREAD_PRECEDENCE_POLICY_COUNT );
|
THREAD_PRECEDENCE_POLICY_COUNT );
|
||||||
if( ret != KERN_SUCCESS )
|
if( ret != KERN_SUCCESS )
|
||||||
LOG->Warn("thread_policy_set(THREAD_PRECEDENCE_POLICY) failed: %s",
|
LOG->Warn( "thread_policy_set(THREAD_PRECEDENCE_POLICY) failed: %s", mach_error_string(ret) );
|
||||||
mach_error_string(ret));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user