mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
Savestates: save cellAudioOut
This commit is contained in:
parent
b692108f1e
commit
57671e267d
@ -178,6 +178,23 @@ audio_out_configuration::audio_out_configuration()
|
||||
cellSysutil.notice("cellAudioOut: initial secondary output configuration: channels=%d, encoder=%d, downmixer=%d", secondary_output.channels, secondary_output.encoder, secondary_output.downmixer);
|
||||
}
|
||||
|
||||
audio_out_configuration::audio_out_configuration(utils::serial& ar)
|
||||
: audio_out_configuration()
|
||||
{
|
||||
// Load configuartion (ar is reading)
|
||||
save(ar);
|
||||
}
|
||||
|
||||
void audio_out_configuration::save(utils::serial& ar)
|
||||
{
|
||||
USING_SERIALIZATION_VERSION_COND(ar.is_writing(), cellAudioOut);
|
||||
|
||||
for (auto& state : out)
|
||||
{
|
||||
ar(state.state, state.channels, state.encoder, state.downmixer, state.copy_control, state.sound_modes, state.sound_mode);
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<AudioChannelCnt, AudioChannelCnt> audio_out_configuration::audio_out::get_channel_count_and_downmixer() const
|
||||
{
|
||||
std::pair<AudioChannelCnt, AudioChannelCnt> ret;
|
||||
|
@ -135,6 +135,8 @@ struct CellAudioOutSoundMode
|
||||
u8 fs;
|
||||
u8 reserved;
|
||||
be_t<u32> layout;
|
||||
|
||||
ENABLE_BITWISE_SERIALIZATION;
|
||||
};
|
||||
|
||||
struct CellAudioOutDeviceInfo
|
||||
@ -217,5 +219,8 @@ struct audio_out_configuration
|
||||
|
||||
std::array<audio_out, 2> out;
|
||||
|
||||
SAVESTATE_INIT_POS(8.9); // Is a dependency of cellAudio
|
||||
audio_out_configuration();
|
||||
audio_out_configuration(utils::serial& ar);
|
||||
void save(utils::serial& ar);
|
||||
};
|
||||
|
@ -71,7 +71,7 @@ struct serial_ver_t
|
||||
std::set<u32> compatible_versions;
|
||||
};
|
||||
|
||||
static std::array<serial_ver_t, 22> s_serial_versions;
|
||||
static std::array<serial_ver_t, 23> s_serial_versions;
|
||||
|
||||
#define SERIALIZATION_VER(name, identifier, ...) \
|
||||
\
|
||||
@ -125,6 +125,7 @@ SERIALIZATION_VER(cellVoice, 18, 1)
|
||||
SERIALIZATION_VER(cellGcm, 19, 1)
|
||||
SERIALIZATION_VER(sysPrxForUser, 20, 1)
|
||||
SERIALIZATION_VER(cellSaveData, 21, 1)
|
||||
SERIALIZATION_VER(cellAudioOut, 22, 1)
|
||||
|
||||
#undef SERIALIZATION_VER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user