implement a few mxstream* methods (#252)

* commit code

* commit code

* Update mxdiskstreamprovider.cpp

* Update mxstreamprovider.h

* improve match + add html file to gitignore

* improve match of MxRAMStreamController::Open

* MxDiskStreamController::Open

* Match some functions, relocate m_target to `MxThread`

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2023-10-29 10:01:14 -04:00
committed by GitHub
parent 153f4a872e
commit f4646a7075
12 changed files with 139 additions and 53 deletions

View File

@@ -1,5 +1,10 @@
#include "mxdiskstreamcontroller.h"
#include "mxautolocker.h"
#include "mxdiskstreamprovider.h"
#include "mxomni.h"
#include "mxticklemanager.h"
// OFFSET: LEGO1 0x100c7120 STUB
MxDiskStreamController::MxDiskStreamController()
{
@@ -19,11 +24,30 @@ MxResult MxDiskStreamController::Tickle()
return SUCCESS;
}
// OFFSET: LEGO1 0x100c7790 STUB
// OFFSET: LEGO1 0x100c7790
MxResult MxDiskStreamController::Open(const char* p_filename)
{
// TODO
return FAILURE;
MxAutoLocker lock(&this->m_criticalSection);
MxResult result = MxStreamController::Open(p_filename);
if (result == SUCCESS) {
m_provider = new MxDiskStreamProvider();
if (m_provider == NULL) {
result = FAILURE;
}
else {
result = m_provider->SetResourceToGet(this);
if (result != SUCCESS) {
delete m_provider;
m_provider = NULL;
}
else {
TickleManager()->RegisterClient(this, 10);
}
}
}
return result;
}
// OFFSET: LEGO1 0x100c7880