mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 14:15:41 +12:00
HLE DSP: Fix AAC response stub
This commit is contained in:
parent
ad380b8c5a
commit
e4b81d61a4
2 changed files with 8 additions and 5 deletions
|
@ -294,12 +294,12 @@ namespace Audio::HLE {
|
|||
|
||||
struct SourceStatus {
|
||||
struct Status {
|
||||
u8 isEnabled; ///< Is this channel enabled? (Doesn't have to be playing anything.)
|
||||
u8 enabled; ///< Is this channel enabled? (Doesn't have to be playing anything.)
|
||||
u8 currentBufferIDDirty; ///< Non-zero when current_buffer_id changes
|
||||
u16_le syncCount; ///< Is set by the DSP to the value of SourceConfiguration::sync_count
|
||||
u32_dsp samplePosition; ///< Number of samples into the current buffer
|
||||
u16_le currentBufferID; ///< Updated when a buffer finishes playing
|
||||
u16_le lastBufferID; ///< Updated when all buffers in the queue finish playing
|
||||
u16_le previousBufferID; ///< Updated when all buffers in the queue finish playing
|
||||
};
|
||||
|
||||
Status status[sourceCount];
|
||||
|
|
|
@ -229,11 +229,11 @@ namespace Audio {
|
|||
|
||||
// Update write region of shared memory
|
||||
auto& status = write.sourceStatuses.status[i];
|
||||
status.isEnabled = source.enabled;
|
||||
status.enabled = source.enabled;
|
||||
status.syncCount = source.syncCount;
|
||||
status.currentBufferIDDirty = source.isBufferIDDirty ? 1 : 0;
|
||||
status.currentBufferID = source.currentBufferID;
|
||||
status.lastBufferID = source.previousBufferID;
|
||||
status.previousBufferID = source.previousBufferID;
|
||||
// TODO: Properly update sample position
|
||||
status.samplePosition = source.samplePosition;
|
||||
|
||||
|
@ -503,7 +503,7 @@ namespace Audio {
|
|||
}
|
||||
|
||||
void HLE_DSP::handleAACRequest(const AAC::Message& request) {
|
||||
AAC::Message response = {};
|
||||
AAC::Message response;
|
||||
|
||||
switch (request.command) {
|
||||
case AAC::Command::EncodeDecode:
|
||||
|
@ -514,6 +514,9 @@ namespace Audio {
|
|||
response.decodeResponse.sampleCount = 1024;
|
||||
response.decodeResponse.size = 0;
|
||||
response.decodeResponse.sampleRate = AAC::SampleRate::Rate48000;
|
||||
|
||||
response.command = request.command;
|
||||
response.mode = request.mode;
|
||||
break;
|
||||
|
||||
case AAC::Command::Init:
|
||||
|
|
Loading…
Add table
Reference in a new issue