Remove debugging output.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "RageLog.h"
|
|
||||||
#include "RageSoundDriver_CA.h"
|
#include "RageSoundDriver_CA.h"
|
||||||
#include "CAHelpers.h"
|
#include "CAHelpers.h"
|
||||||
|
|
||||||
@@ -16,7 +15,6 @@ AudioConverter::AudioConverter(CAAudioHardwareDevice *dev, RageSound_CA *driver)
|
|||||||
vector<Desc> physicalFormats;
|
vector<Desc> physicalFormats;
|
||||||
UInt32 numFormats = stream.GetNumberAvailableIOProcFormats();
|
UInt32 numFormats = stream.GetNumberAvailableIOProcFormats();
|
||||||
|
|
||||||
LOG->Trace("%u IOProc formats.", unsigned(numFormats));
|
|
||||||
for (UInt32 i=0; i<numFormats; ++i)
|
for (UInt32 i=0; i<numFormats; ++i)
|
||||||
{
|
{
|
||||||
Desc desc;
|
Desc desc;
|
||||||
@@ -29,7 +27,6 @@ AudioConverter::AudioConverter(CAAudioHardwareDevice *dev, RageSound_CA *driver)
|
|||||||
stream.SetCurrentIOProcFormat(procFormat);
|
stream.SetCurrentIOProcFormat(procFormat);
|
||||||
|
|
||||||
numFormats = stream.GetNumberAvailablePhysicalFormats();
|
numFormats = stream.GetNumberAvailablePhysicalFormats();
|
||||||
LOG->Trace("%u physical formats.", unsigned(numFormats));
|
|
||||||
for (UInt32 i=0; i<numFormats; ++i)
|
for (UInt32 i=0; i<numFormats; ++i)
|
||||||
{
|
{
|
||||||
Desc desc;
|
Desc desc;
|
||||||
@@ -45,7 +42,6 @@ AudioConverter::AudioConverter(CAAudioHardwareDevice *dev, RageSound_CA *driver)
|
|||||||
kFramesPerPacket, kBytesPerFrame, kChannelsPerFrame,
|
kFramesPerPacket, kBytesPerFrame, kChannelsPerFrame,
|
||||||
kBitsPerChannel, kFormatFlags);
|
kBitsPerChannel, kFormatFlags);
|
||||||
|
|
||||||
LOG->Trace("Initializing converter.");
|
|
||||||
SMFormat.Print();
|
SMFormat.Print();
|
||||||
procFormat.Print();
|
procFormat.Print();
|
||||||
if (this->Initialize(SMFormat, procFormat))
|
if (this->Initialize(SMFormat, procFormat))
|
||||||
@@ -75,7 +71,6 @@ OSStatus AudioConverter::FormatConverterInputProc(UInt32& ioNumberDataPackets,
|
|||||||
|
|
||||||
Desc AudioConverter::FindClosestFormat(const vector<Desc>& formats)
|
Desc AudioConverter::FindClosestFormat(const vector<Desc>& formats)
|
||||||
{
|
{
|
||||||
LOG->Trace("FindClosestFormat");
|
|
||||||
vector<Desc> v;
|
vector<Desc> v;
|
||||||
|
|
||||||
vector<Desc>::const_iterator i;
|
vector<Desc>::const_iterator i;
|
||||||
@@ -90,23 +85,19 @@ Desc AudioConverter::FindClosestFormat(const vector<Desc>& formats)
|
|||||||
(format.mFormatFlags & kAudioFormatFlagIsSignedInteger) ==
|
(format.mFormatFlags & kAudioFormatFlagIsSignedInteger) ==
|
||||||
kAudioFormatFlagIsSignedInteger)
|
kAudioFormatFlagIsSignedInteger)
|
||||||
{ // exact match
|
{ // exact match
|
||||||
LOG->Trace("Exact match.");
|
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
v.push_back(format);
|
v.push_back(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG->Trace("Failed exact match.");
|
|
||||||
for (i = v.begin(); i != v.end(); ++i)
|
for (i = v.begin(); i != v.end(); ++i)
|
||||||
{
|
{
|
||||||
const Desc& format = *i;
|
const Desc& format = *i;
|
||||||
if (format.SampleWordSize() == 2)
|
if (format.SampleWordSize() == 2)
|
||||||
{
|
{
|
||||||
LOG->Trace("Close match.");
|
|
||||||
return format; // close
|
return format; // close
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG->Trace("Failed close match.");
|
|
||||||
if (v.empty())
|
if (v.empty())
|
||||||
RageException::ThrowNonfatal("Couldn't find a close format.");
|
RageException::ThrowNonfatal("Couldn't find a close format.");
|
||||||
return v[0]; // something is better than nothing.
|
return v[0]; // something is better than nothing.
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "RageLog.h"
|
|
||||||
#include "RageSoundManager.h"
|
|
||||||
#include "RageSoundDriver_CA.h"
|
#include "RageSoundDriver_CA.h"
|
||||||
#include "CAHelpers.h"
|
#include "CAHelpers.h"
|
||||||
|
|
||||||
@@ -68,13 +66,8 @@ int64_t RageSound_CA::GetPosition(const RageSoundBase *sound) const
|
|||||||
|
|
||||||
void RageSound_CA::FillConverter(void *data, UInt32 dataByteSize)
|
void RageSound_CA::FillConverter(void *data, UInt32 dataByteSize)
|
||||||
{
|
{
|
||||||
LOG->Trace("FillConverter called for %u bytes.", unsigned(dataByteSize));
|
|
||||||
int frames = dataByteSize / gConverter->GetInputFormat().mBytesPerPacket;
|
int frames = dataByteSize / gConverter->GetInputFormat().mBytesPerPacket;
|
||||||
LOG->Trace("Mix being called for %d frames.", frames);
|
|
||||||
LOG->Flush();
|
|
||||||
this->Mix((int16_t *)data, frames, mDecodePos, GetPosition(NULL));
|
this->Mix((int16_t *)data, frames, mDecodePos, GetPosition(NULL));
|
||||||
LOG->Trace("Mixed the data.");
|
|
||||||
LOG->Flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus RageSound_CA::GetData(AudioDeviceID inDevice,
|
OSStatus RageSound_CA::GetData(AudioDeviceID inDevice,
|
||||||
@@ -89,7 +82,6 @@ OSStatus RageSound_CA::GetData(AudioDeviceID inDevice,
|
|||||||
UInt32 dataPackets = outOutputData->mBuffers[0].mDataByteSize;
|
UInt32 dataPackets = outOutputData->mBuffers[0].mDataByteSize;
|
||||||
|
|
||||||
dataPackets /= gConverter->GetOutputFormat().mBytesPerPacket;
|
dataPackets /= gConverter->GetOutputFormat().mBytesPerPacket;
|
||||||
LOG->Trace("Calling FillComplexBuffer for %i packets.", int(dataPackets));
|
|
||||||
|
|
||||||
This->mDecodePos = int64_t(inOutputTime->mSampleTime);
|
This->mDecodePos = int64_t(inOutputTime->mSampleTime);
|
||||||
gConverter->FillComplexBuffer(dataPackets, *outOutputData, NULL);
|
gConverter->FillComplexBuffer(dataPackets, *outOutputData, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user