nw::snd::SoundSystem::GetSoundThreadTickCount Member Function

Syntax

#include <nw/snd/snd_SoundSystem.h>

static void GetSoundThreadTickCount(
     nn::os::Tick & tick,
     int & count
);

Arguments

Name Description
out tick Cumulative processing time within the sound thread.
out count Number of sound thread operations.

Return Values

None.

Description

Gets the cumulative processing time of and the number of operations that occurred within the sound thread process.

Sound thread operations are run periodically (every 5 ms; or to be more precise, every SOUND_THREAD_INTERVAL_USEC microseconds). As a result, if this function is called 60 times a second (once every 16.67 ms or so), the operation count will be between three and four. The cumulative processing time is the time spent on sound thread operations for those three or four operations.

The time required for processing is calculated as the difference between the beginning and end time of the sound thread. Note that as a result, if the CPU switches to another thread while a sound thread is running, the processing time that is returned will include the time spent running the other thread.

The processing time includes the time spent running nn::snd::WaitForDspSync and nn::snd::SendParameterToDsp in addition to the time spent processing the NW4C sound library hierarchy.

The ClearSoundThreadTickCount function can clear the cumulative processing time and the operation count to zero.

It will not work on the PC version.

See Also

ClearSoundThreadTickCount
SOUND_THREAD_INTERVAL_USEC

Revision History

2010/05/08
Eliminated the GetSoundThreadProcessTick function, and added this function.

CONFIDENTIAL