Skip to content

Commit

Permalink
Merge pull request #32 from curtis-j-campbell/feat--adding-mute-block…
Browse files Browse the repository at this point in the history
…-control

Add functionality for mute without slew
  • Loading branch information
MCUdude committed Aug 29, 2022
2 parents b2defb8 + 188aae6 commit 3d151af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/SigmaDSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ void SigmaDSP::volume(uint16_t startMemoryAddress, float dB)
safeload_write(startMemoryAddress, volume);
}

/**
* @brief Control mute/unmute block without slew
*
* @param startMemoryAddress DSP memory address
* @param state true or false
*/
void SigmaDSP::mute(uint16_t startMemoryAddress, bool state)
{
safeload_write(startMemoryAddress, state ? 0x800000 : 0);
}

/**
* @brief Control index filters (bass, treble, ect)
* in 28 0 format. Please see:
Expand Down
1 change: 1 addition & 0 deletions src/SigmaDSP.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class SigmaDSP

void volume_slew(uint16_t startMemoryAddress, float dB, uint8_t slew = 12);
void volume(uint16_t startMemoryAddress, float dB);
void mute(uint16_t startMemoryAddress, bool state);
void dcSource(uint16_t startMemoryAddress, uint32_t value);
void dynamicBass(uint16_t startMemoryAddress, float dB);
void dynamicBass(uint16_t startMemoryAddress, float dB, uint16_t frequency);
Expand Down

0 comments on commit 3d151af

Please sign in to comment.