mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
AudioInterface: Use member initializers where applicable for unions
Migrates more code to the initialization capabilities available since C++11
This commit is contained in:
parent
b59cda1435
commit
038bb9b3e1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user