AudioInterface: Use member initializers where applicable for unions

Migrates more code to the initialization capabilities available since C++11
This commit is contained in:
Lioncash 2018-05-30 09:49:25 -04:00
parent b59cda1435
commit 038bb9b3e1
1 changed files with 4 additions and 5 deletions

View File

@ -73,8 +73,8 @@ enum
// AI Control Register
union AICR
{
AICR() { hex = 0; }
AICR(u32 _hex) { hex = _hex; }
AICR() = default;
explicit AICR(u32 hex_) : hex{hex_} {}
struct
{
u32 PSTAT : 1; // sample counter/playback enable
@ -88,20 +88,19 @@ union AICR
u32 AIDFR : 1; // AID Frequency (0=48khz 1=32khz)
u32 : 25;
};
u32 hex;
u32 hex = 0;
};
// AI Volume Register
union AIVR
{
AIVR() { hex = 0; }
struct
{
u32 left : 8;
u32 right : 8;
u32 : 16;
};
u32 hex;
u32 hex = 0;
};
// STATE_TO_SAVE