summaryrefslogtreecommitdiffstats
path: root/src/audio_core/hle/dsp.h
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-03-26 03:20:34 +0100
committerMerryMage <MerryMage@users.noreply.github.com>2016-03-28 16:51:00 +0200
commit2a99464ef1a35cb97cb94636d99779caa34f3cb7 (patch)
treeb666b55415ed0d71c774621799c7b6e8c0a36411 /src/audio_core/hle/dsp.h
parentDSP: Implement audio codecs (PCM8, PCM16, ADPCM) (diff)
downloadyuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.tar
yuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.tar.gz
yuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.tar.bz2
yuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.tar.lz
yuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.tar.xz
yuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.tar.zst
yuzu-2a99464ef1a35cb97cb94636d99779caa34f3cb7.zip
Diffstat (limited to 'src/audio_core/hle/dsp.h')
-rw-r--r--src/audio_core/hle/dsp.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/audio_core/hle/dsp.h b/src/audio_core/hle/dsp.h
index 376436c29..c15ef0b7a 100644
--- a/src/audio_core/hle/dsp.h
+++ b/src/audio_core/hle/dsp.h
@@ -126,8 +126,11 @@ struct SourceConfiguration {
union {
u32_le dirty_raw;
+ BitField<0, 1, u32_le> format_dirty;
+ BitField<1, 1, u32_le> mono_or_stereo_dirty;
BitField<2, 1, u32_le> adpcm_coefficients_dirty;
BitField<3, 1, u32_le> partial_embedded_buffer_dirty; ///< Tends to be set when a looped buffer is queued.
+ BitField<4, 1, u32_le> partial_reset_flag;
BitField<16, 1, u32_le> enable_dirty;
BitField<17, 1, u32_le> interpolation_dirty;
@@ -143,8 +146,7 @@ struct SourceConfiguration {
BitField<27, 1, u32_le> gain_2_dirty;
BitField<28, 1, u32_le> sync_dirty;
BitField<29, 1, u32_le> reset_flag;
-
- BitField<31, 1, u32_le> embedded_buffer_dirty;
+ BitField<30, 1, u32_le> embedded_buffer_dirty;
};
// Gain control
@@ -175,7 +177,8 @@ struct SourceConfiguration {
/**
* This is the simplest normalized first-order digital recursive filter.
* The transfer function of this filter is:
- * H(z) = b0 / (1 + a1 z^-1)
+ * H(z) = b0 / (1 - a1 z^-1)
+ * Note the feedbackward coefficient is negated.
* Values are signed fixed point with 15 fractional bits.
*/
struct SimpleFilter {
@@ -192,11 +195,11 @@ struct SourceConfiguration {
* Values are signed fixed point with 14 fractional bits.
*/
struct BiquadFilter {
- s16_le b0;
- s16_le b1;
- s16_le b2;
- s16_le a1;
s16_le a2;
+ s16_le a1;
+ s16_le b2;
+ s16_le b1;
+ s16_le b0;
};
union {