Skip to content

Commit 8cd3e85

Browse files
committed
I2SCodecStream setInputVolume
1 parent 5aa09b6 commit 8cd3e85

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AudioTools/AudioLibs/I2SCodecStream.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ class I2SCodecStream : public AudioStream, public VolumeSupport {
169169
return p_board->setPAPower(active);
170170
}
171171

172+
/// Sets the volume of the microphone (if available)
173+
bool setInputVolume(float vol){
174+
if (!is_active || p_board == nullptr) return false;
175+
return p_board->setInputVolume(100.0 * vol);
176+
}
177+
172178
/// Provides the board
173179
AudioBoard &board() { return *p_board; }
174180
/// (re)defines the board

0 commit comments

Comments
 (0)