mirror of
https://github.com/citra-emu/citra.git
synced 2025-05-19 05:50:06 +00:00

* DSP: Implement Pipe 2 Pipe 2 is a DSP pipe that is used to initialize both the DSP hardware (the application signals to the DSP to initialize) and the application (the DSP provides the memory location of structures in the shared memory region). * AudioCore: Implement codecs (DecodeADPCM, DecodePCM8, DecodePCM16) * DSP Pipes: Implement as FIFO * AudioCore: File structure * AudioCore: More structure * AudioCore: Buffer management * DSP/Source: Reorganise Source's AdvanceFrame. * Audio Output * lolidk * huh? * interp * More interp stuff * oops * Zero State * Don't mix Source frame if it's not enabled * DSP: Forgot to zero a buffer, adjusted thread synchronisation, adjusted format spec for buffers * asdf * Get it to compile and tweak stretching a bit. * revert stretch test * deleted accidental partial catch submodule commit * new audio stretching algorithm * update .gitmodule * fix OS X build * remove getopt from rubberband * #include <stddef> to audio_core.h * typo * -framework Accelerate * OptionTransientsSmooth -> OptionTransientsCrisp * tweak stretch tempo smoothing coefficient. also switch back to smooth. * tweak mroe * remove printf * sola * #include <cmath> * VERY QUICK MERGE TO GET IT WORKING DOESN'T ACTIVATE AUDIO FILTERS * Reminder to self * fix comparison * common/thread: Correct code style * Thread: Make Barrier reusable * fix threading synchonisation code * add profiling code * print error to console when audio clips * fix metallic sound * reduce logspam
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
// Copyright 2016 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <vector>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
namespace DSP {
|
|
namespace HLE {
|
|
|
|
/// Reset the pipes by setting pipe positions back to the beginning.
|
|
void ResetPipes();
|
|
|
|
enum class DspPipe {
|
|
Debug = 0,
|
|
Dma = 1,
|
|
Audio = 2,
|
|
Binary = 3,
|
|
DspPipe_MAX
|
|
};
|
|
|
|
constexpr size_t DspPipe_MAX = static_cast<size_t>(DspPipe::DspPipe_MAX);
|
|
|
|
/**
|
|
* Read a DSP pipe.
|
|
* @param pipe_number The Pipe ID
|
|
* @param length How much data to request.
|
|
* @return The data read from the pipe. The size of this vector can be less than the length requested.
|
|
*/
|
|
std::vector<u8> PipeRead(DspPipe pipe_number, u32 length);
|
|
|
|
/**
|
|
* How much data is left in pipe
|
|
* @param pipe_number The Pipe ID
|
|
* @return The amount of data remaning in the pipe. This is the maximum length PipeRead will return.
|
|
*/
|
|
size_t GetPipeReadableSize(DspPipe pipe_number);
|
|
|
|
/**
|
|
* Write to a DSP pipe.
|
|
* @param pipe_number The Pipe ID
|
|
* @param buffer The data to write to the pipe.
|
|
*/
|
|
void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer);
|
|
|
|
enum class DspState {
|
|
Off,
|
|
On,
|
|
Sleeping
|
|
};
|
|
/// Get the state of the DSP
|
|
DspState GetDspState();
|
|
|
|
} // namespace HLE
|
|
} // namespace DSP
|