mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 21:02:47 +00:00
Merge pull request #2160 from lioncash/audio-warn
audio_core: Resolve compilation warnings
This commit is contained in:
commit
1cffd3848b
|
@ -68,8 +68,8 @@ std::vector<s16> DecodeADPCM(const u8* const data, std::size_t size, const ADPCM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state.yn1 = yn1;
|
state.yn1 = static_cast<s16>(yn1);
|
||||||
state.yn2 = yn2;
|
state.yn2 = static_cast<s16>(yn2);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~CubebSinkStream() {
|
~CubebSinkStream() override {
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -75,11 +75,11 @@ public:
|
||||||
queue.Push(samples);
|
queue.Push(samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t SamplesInQueue(u32 num_channels) const override {
|
std::size_t SamplesInQueue(u32 channel_count) const override {
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return queue.Size() / num_channels;
|
return queue.Size() / channel_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Flush() override {
|
void Flush() override {
|
||||||
|
@ -98,7 +98,7 @@ private:
|
||||||
u32 num_channels{};
|
u32 num_channels{};
|
||||||
|
|
||||||
Common::RingBuffer<s16, 0x10000> queue;
|
Common::RingBuffer<s16, 0x10000> queue;
|
||||||
std::array<s16, 2> last_frame;
|
std::array<s16, 2> last_frame{};
|
||||||
std::atomic<bool> should_flush{};
|
std::atomic<bool> should_flush{};
|
||||||
TimeStretcher time_stretch;
|
TimeStretcher time_stretch;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue