Skip to content

Commit

Permalink
I2SCodecStream setInputVolume
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Nov 2, 2024
1 parent 5aa09b6 commit 8cd3e85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/AudioTools/AudioLibs/I2SCodecStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ class I2SCodecStream : public AudioStream, public VolumeSupport {
return p_board->setPAPower(active);
}

/// Sets the volume of the microphone (if available)
bool setInputVolume(float vol){
if (!is_active || p_board == nullptr) return false;
return p_board->setInputVolume(100.0 * vol);
}

/// Provides the board
AudioBoard &board() { return *p_board; }
/// (re)defines the board
Expand Down

0 comments on commit 8cd3e85

Please sign in to comment.