mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-22 02:35:23 +12:00
Format
This commit is contained in:
parent
26c07717aa
commit
9c981fa376
2 changed files with 17 additions and 18 deletions
|
@ -99,6 +99,7 @@ namespace Audio {
|
||||||
|
|
||||||
using Source = Audio::DSPSource;
|
using Source = Audio::DSPSource;
|
||||||
using SampleBuffer = Source::SampleBuffer;
|
using SampleBuffer = Source::SampleBuffer;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class DSPState : u32 {
|
enum class DSPState : u32 {
|
||||||
Off,
|
Off,
|
||||||
|
|
|
@ -145,10 +145,7 @@ namespace Audio {
|
||||||
dspService.triggerPipeEvent(DSPPipeType::Audio);
|
dspService.triggerPipeEvent(DSPPipeType::Audio);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case StateChange::Shutdown:
|
case StateChange::Shutdown: dspState = DSPState::Off; break;
|
||||||
dspState = DSPState::Off;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: Helpers::panic("Unimplemented DSP audio pipe state change %d", state);
|
default: Helpers::panic("Unimplemented DSP audio pipe state change %d", state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,7 +338,8 @@ namespace Audio {
|
||||||
|
|
||||||
HLE_DSP::SampleBuffer HLE_DSP::decodeADPCM(const u8* data, usize sampleCount, Source& source) {
|
HLE_DSP::SampleBuffer HLE_DSP::decodeADPCM(const u8* data, usize sampleCount, Source& source) {
|
||||||
static constexpr uint samplesPerBlock = 14;
|
static constexpr uint samplesPerBlock = 14;
|
||||||
// An ADPCM block is comprised of a single header which contains the scale and predictor value for the block, and then 14 4bpp samples (hence the / 2)
|
// An ADPCM block is comprised of a single header which contains the scale and predictor value for the block, and then 14 4bpp samples (hence
|
||||||
|
// the / 2)
|
||||||
static constexpr usize blockSize = sizeof(u8) + samplesPerBlock / 2;
|
static constexpr usize blockSize = sizeof(u8) + samplesPerBlock / 2;
|
||||||
|
|
||||||
// How many ADPCM blocks we'll be consuming. It's sampleCount / samplesPerBlock, rounded up.
|
// How many ADPCM blocks we'll be consuming. It's sampleCount / samplesPerBlock, rounded up.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue