AXSetDeviceVolume

Syntax

#include <cafe/ax.h>

AXPB_ERROR_CODE AXSetDeviceVolume(AXPBDeviceType device, u32 Id, u16 volume);

Parameters

device Output device.
Id Device instance.
volume Volume to set.

Return Values

Zero if successful, an error of type AXPB_ERROR_CODE otherwise.

Description

Sets the master volume for the specified output device. The volume is a 16-bit fixed point number, where the high-order bit represents the integer part and the lower 15 bits represent the fraction. The selectable range is from 0x0000 (= 0.0) to 0x8000 (= 1.0). The default value is 1.0 (0x8000). The master volume value is applied to rendered audio data. Setting a master volume value that is different from the current value (such as 0x80000x0000) may cause noise. Change the master volume gradually in appropriately timed steps.

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AX Data Structures and Definitions
AXGetDeviceVolume

Revision History

2013/05/08 Automated cleanup pass.
2012/01/26 Update to Audio API v2.0.
2011/02/21 Initial Version


CONFIDENTIAL