mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
CellAudio fixes
This commit is contained in:
parent
38bfefcdfa
commit
e5005597fe
@ -51,7 +51,7 @@ public:
|
||||
/*
|
||||
* Pure virtual methods
|
||||
*/
|
||||
virtual const char* GetName() const = 0;
|
||||
virtual std::string_view GetName() const = 0;
|
||||
virtual u32 GetCapabilities() const = 0;
|
||||
|
||||
virtual void Open(AudioFreq freq, AudioSampleSize sample_size, AudioChannelCnt ch_cnt) = 0;
|
||||
|
@ -16,7 +16,7 @@ public:
|
||||
CubebBackend(const CubebBackend&) = delete;
|
||||
CubebBackend& operator=(const CubebBackend&) = delete;
|
||||
|
||||
const char* GetName() const override { return "Cubeb"; }
|
||||
std::string_view GetName() const override { return "Cubeb"sv; }
|
||||
|
||||
static const u32 capabilities = 0;
|
||||
u32 GetCapabilities() const override { return capabilities; }
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
FAudioBackend(const FAudioBackend&) = delete;
|
||||
FAudioBackend& operator=(const FAudioBackend&) = delete;
|
||||
|
||||
const char* GetName() const override { return "FAudio"; }
|
||||
std::string_view GetName() const override { return "FAudio"sv; }
|
||||
|
||||
static const u32 capabilities = SET_FREQUENCY_RATIO;
|
||||
u32 GetCapabilities() const override { return capabilities; }
|
||||
|
@ -8,7 +8,7 @@ public:
|
||||
NullAudioBackend() {}
|
||||
~NullAudioBackend() {}
|
||||
|
||||
const char* GetName() const override { return "Null"; }
|
||||
std::string_view GetName() const override { return "Null"sv; }
|
||||
|
||||
static const u32 capabilities = 0;
|
||||
u32 GetCapabilities() const override { return capabilities; }
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
XAudio2Backend(const XAudio2Backend&) = delete;
|
||||
XAudio2Backend& operator=(const XAudio2Backend&) = delete;
|
||||
|
||||
const char* GetName() const override { return "XAudio2"; }
|
||||
std::string_view GetName() const override { return "XAudio2"sv; }
|
||||
|
||||
static const u32 capabilities = SET_FREQUENCY_RATIO;
|
||||
u32 GetCapabilities() const override { return capabilities; }
|
||||
|
@ -92,7 +92,7 @@ void cell_audio_config::reset(bool backend_changed)
|
||||
audio_buffer_size = audio_buffer_length * audio_sample_size;
|
||||
|
||||
desired_buffer_duration = raw.desired_buffer_duration * 1000llu;
|
||||
buffering_enabled = raw.buffering_enabled;
|
||||
buffering_enabled = raw.buffering_enabled && raw.renderer != audio_renderer::null;
|
||||
|
||||
minimum_block_period = audio_block_period / 2;
|
||||
maximum_block_period = (6 * audio_block_period) / 5;
|
||||
@ -598,15 +598,13 @@ void cell_audio_thread::reset_counters()
|
||||
m_backend_failed = false;
|
||||
}
|
||||
|
||||
void cell_audio_thread::operator()()
|
||||
cell_audio_thread::cell_audio_thread()
|
||||
{
|
||||
if (cfg.raw.provider != audio_provider::cell_audio)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
thread_ctrl::scoped_priority high_prio(+1);
|
||||
|
||||
// Init audio config
|
||||
cfg.reset();
|
||||
|
||||
@ -615,6 +613,16 @@ void cell_audio_thread::operator()()
|
||||
|
||||
// Initialize loop variables
|
||||
reset_counters();
|
||||
}
|
||||
|
||||
void cell_audio_thread::operator()()
|
||||
{
|
||||
if (cfg.raw.provider != audio_provider::cell_audio)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
thread_ctrl::scoped_priority high_prio(+1);
|
||||
|
||||
u32 untouched_expected = 0;
|
||||
|
||||
|
@ -360,7 +360,7 @@ public:
|
||||
return backend->Operational();
|
||||
}
|
||||
|
||||
const char* get_backend_name() const
|
||||
std::string_view get_backend_name() const
|
||||
{
|
||||
return backend->GetName();
|
||||
}
|
||||
@ -415,11 +415,9 @@ public:
|
||||
f32 m_average_playtime = 0.0f;
|
||||
bool m_backend_failed = false;
|
||||
|
||||
void operator()();
|
||||
cell_audio_thread();
|
||||
|
||||
cell_audio_thread()
|
||||
{
|
||||
}
|
||||
void operator()();
|
||||
|
||||
audio_port* open_port()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user