mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 02:37:57 -05:00
Added audren:u#GetAudioRendererState
This commit is contained in:
@ -79,6 +79,10 @@ u32 AudioRenderer::GetMixBufferCount() const {
|
||||
return worker_params.mix_buffer_count;
|
||||
}
|
||||
|
||||
u32 AudioRenderer::GetState() const {
|
||||
return stream->GetState();
|
||||
}
|
||||
|
||||
std::vector<u8> AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_params) {
|
||||
// Copy UpdateDataHeader struct
|
||||
UpdateDataHeader config{};
|
||||
|
@ -170,6 +170,7 @@ public:
|
||||
u32 GetSampleRate() const;
|
||||
u32 GetSampleCount() const;
|
||||
u32 GetMixBufferCount() const;
|
||||
u32 GetState() const;
|
||||
|
||||
private:
|
||||
class VoiceState;
|
||||
|
@ -49,9 +49,14 @@ void Stream::Play() {
|
||||
}
|
||||
|
||||
void Stream::Stop() {
|
||||
state = State::Stopped;
|
||||
ASSERT_MSG(false, "Unimplemented");
|
||||
}
|
||||
|
||||
u32 Stream::GetState() const {
|
||||
return static_cast<u32>(state);
|
||||
}
|
||||
|
||||
s64 Stream::GetBufferReleaseCycles(const Buffer& buffer) const {
|
||||
const std::size_t num_samples{buffer.GetSamples().size() / GetNumChannels()};
|
||||
return CoreTiming::usToCycles((static_cast<u64>(num_samples) * 1000000) / sample_rate);
|
||||
|
@ -72,6 +72,9 @@ public:
|
||||
/// Gets the number of channels
|
||||
u32 GetNumChannels() const;
|
||||
|
||||
/// Get the state
|
||||
u32 GetState() const;
|
||||
|
||||
private:
|
||||
/// Current state of the stream
|
||||
enum class State {
|
||||
|
Reference in New Issue
Block a user