mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
cellAudioOut: Use bev_bdvd for disc game PARAM.SFO
Game Data PARAM.SFO does not contain SOUND_FORMAT
This commit is contained in:
parent
1227b0a633
commit
1bbb26334a
3 changed files with 17 additions and 5 deletions
|
@ -39,7 +39,7 @@ audio_out_configuration::audio_out_configuration()
|
||||||
std::vector<CellAudioOutSoundMode>& primary_modes = primary_output.sound_modes;
|
std::vector<CellAudioOutSoundMode>& primary_modes = primary_output.sound_modes;
|
||||||
std::vector<CellAudioOutSoundMode>& secondary_modes = secondary_output.sound_modes;
|
std::vector<CellAudioOutSoundMode>& secondary_modes = secondary_output.sound_modes;
|
||||||
|
|
||||||
const psf::registry sfo = psf::load_object(fs::file(Emu.GetSfoDir() + "/PARAM.SFO"));
|
const psf::registry sfo = psf::load_object(fs::file(Emu.GetSfoDir(true) + "/PARAM.SFO"));
|
||||||
const s32 sound_format = psf::get_integer(sfo, "SOUND_FORMAT", psf::sound_format_flag::lpcm_2); // Default to Linear PCM 2 Ch.
|
const s32 sound_format = psf::get_integer(sfo, "SOUND_FORMAT", psf::sound_format_flag::lpcm_2); // Default to Linear PCM 2 Ch.
|
||||||
|
|
||||||
const bool supports_lpcm_2 = (sound_format & psf::sound_format_flag::lpcm_2); // Linear PCM 2 Ch.
|
const bool supports_lpcm_2 = (sound_format & psf::sound_format_flag::lpcm_2); // Linear PCM 2 Ch.
|
||||||
|
|
|
@ -2222,4 +2222,19 @@ const std::string& Emulator::GetFakeCat() const
|
||||||
return m_cat;
|
return m_cat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const std::string Emulator::GetSfoDir(bool prefer_disc_sfo) const
|
||||||
|
{
|
||||||
|
if (prefer_disc_sfo)
|
||||||
|
{
|
||||||
|
const std::string sfo_dir = vfs::get("/dev_bdvd/PS3_GAME");
|
||||||
|
|
||||||
|
if (!sfo_dir.empty())
|
||||||
|
{
|
||||||
|
return sfo_dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_sfo_dir;
|
||||||
|
}
|
||||||
|
|
||||||
Emulator Emu;
|
Emulator Emu;
|
||||||
|
|
|
@ -225,10 +225,7 @@ public:
|
||||||
return m_dir;
|
return m_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& GetSfoDir() const
|
const std::string GetSfoDir(bool prefer_disc_sfo) const;
|
||||||
{
|
|
||||||
return m_sfo_dir;
|
|
||||||
}
|
|
||||||
|
|
||||||
// String for GUI dialogs.
|
// String for GUI dialogs.
|
||||||
const std::string& GetUsr() const
|
const std::string& GetUsr() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue