audio_core: pass in memory reference
Because HLE::Source is initialized as an array in the member initializer, it is hard to let it accept the reference on ctor, so it has a second init stage performed by DspHle::Impl::Impl
This commit is contained in:
parent
8bb404c82a
commit
ec01975549
4 changed files with 24 additions and 4 deletions
|
@ -14,6 +14,10 @@
|
|||
#include "audio_core/interpolate.h"
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace Memory {
|
||||
class MemorySystem;
|
||||
}
|
||||
|
||||
namespace AudioCore {
|
||||
namespace HLE {
|
||||
|
||||
|
@ -35,6 +39,9 @@ public:
|
|||
/// Resets internal state.
|
||||
void Reset();
|
||||
|
||||
/// Sets the memory system to read data from
|
||||
void SetMemory(Memory::MemorySystem& memory);
|
||||
|
||||
/**
|
||||
* This is called once every audio frame. This performs per-source processing every frame.
|
||||
* @param config The new configuration we've got for this Source from the application.
|
||||
|
@ -56,6 +63,7 @@ public:
|
|||
|
||||
private:
|
||||
const std::size_t source_id;
|
||||
Memory::MemorySystem* memory_system;
|
||||
StereoFrame16 current_frame;
|
||||
|
||||
using Format = SourceConfiguration::Configuration::Format;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue