Go to main content

man pages section 9: DDI and DKI Driver Entry Points

Exit Print View

Updated: July 2017
 
 

audio_engine_count(9E)

Name

audio_engine_count - return the sample count for an audio engine

Synopsis

#include <sys/audio/audio_driver.h>

uint64_t prefix_count(void *state);

Parameters

state

pointer to driver supplied soft state

Interface Level

Solaris DDI specific (Solaris DDI)

Description

The audio_engine_count() function returns the frame count of the engine, which is the number of frames transferred by the engine since it was last opened with audio_engine_open(9E) .

For recording, this frame count will be the total number of frames that the engine has written into the buffer. For playback, it will be the number of frames that the engine has read from the buffer. This value is monotonically increasing and does not wrap.

The audio_engine_open() function, however, will reset the frame count to 0.

The frame count for the engine is related to the offset of the data in the buffer. Both normally increase as the engine makes progress, but the engine index wraps when it reaches the end of the buffer or when the device is stopped and restarted with audio_engine_stop(9E) and audio_engine_start(9E).

Return Values

The audio_engine_count() function returns the number of frames transferred by the engine since audio_engine_open() was called.

Context

This function may be called from user or interrupt context.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed

See Also

attributes(5), audio(7D), audio_engine_open(9E), audio_engine_start(9E) , audio_engine_stop(9E), audio_engine_ops(9S)