mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Fix compilation errors on GCC/Clang
This commit is contained in:
parent
318f55f7c3
commit
8fb758eca4
2 changed files with 4 additions and 4 deletions
|
@ -96,7 +96,7 @@ namespace Common {
|
|||
// Having them on the same cache-line would result in false-sharing between them.
|
||||
// TODO: Remove this ifdef whenever clang and GCC support
|
||||
// std::hardware_destructive_interference_size.
|
||||
#ifdef __cpp_lib_hardware_interference_size
|
||||
#if __cpp_lib_hardware_interference_size == 201703L
|
||||
alignas(std::hardware_destructive_interference_size) std::atomic_size_t m_read_index{0};
|
||||
alignas(std::hardware_destructive_interference_size) std::atomic_size_t m_write_index{0};
|
||||
#else
|
||||
|
|
|
@ -53,7 +53,7 @@ TeakraDSP::TeakraDSP(Memory& mem, Scheduler& scheduler, DSPService& dspService)
|
|||
ahbm.write32 = [&](u32 addr, u32 value) { *(u32*)&mem.getFCRAM()[addr - PhysicalAddrs::FCRAM] = value; };
|
||||
|
||||
teakra.SetAHBMCallback(ahbm);
|
||||
teakra.SetAudioCallback([=](std::array<s16, 2> sample) { /* Do nothing */ });
|
||||
teakra.SetAudioCallback([](std::array<s16, 2> sample) { /* Do nothing */ });
|
||||
|
||||
// Set up event handlers. These handlers forward a hardware interrupt to the DSP service, which is responsible
|
||||
// For triggering the appropriate DSP kernel events
|
||||
|
@ -123,7 +123,7 @@ void TeakraDSP::setAudioEnabled(bool enable) {
|
|||
|
||||
// Set the appropriate audio callback for Teakra
|
||||
if (audioEnabled) {
|
||||
teakra.SetAudioCallback([=](std::array<s16, 2> sample) {
|
||||
teakra.SetAudioCallback([this](std::array<s16, 2> sample) {
|
||||
audioFrame[audioFrameIndex++] = sample[0];
|
||||
audioFrame[audioFrameIndex++] = sample[1];
|
||||
|
||||
|
@ -140,7 +140,7 @@ void TeakraDSP::setAudioEnabled(bool enable) {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
teakra.SetAudioCallback([=](std::array<s16, 2> sample) { /* Do nothing */ });
|
||||
teakra.SetAudioCallback([](std::array<s16, 2> sample) { /* Do nothing */ });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue