File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,11 +138,16 @@ void indicatorThread() {
138138 std::valarray<short > samples (success_pcm_len / 2 );
139139 for (size_t i = 0 ; i < success_pcm_len; i += 2 )
140140 samples[i / 2 ] = static_cast <short >(success_pcm[i] | (success_pcm[i + 1 ] << 8 ));
141+ for (auto & sample : samples)
142+ // Decrease volume
143+ sample = static_cast <short >(sample * 0.15 );
141144 if (!playAsyncSoundEffect (samples)) printf (" \007 " );
142145 } else if (clipboard_state == ClipboardState::Error && !envVarIsTrue (" CLIPBOARD_NOAUDIO" )) {
143146 std::valarray<short > samples (error_pcm_len / 2 );
144147 for (size_t i = 0 ; i < error_pcm_len; i += 2 )
145148 samples[i / 2 ] = static_cast <short >(error_pcm[i] | (error_pcm[i + 1 ] << 8 ));
149+ for (auto & sample : samples)
150+ sample = static_cast <short >(sample * 0.15 );
146151 if (!playAsyncSoundEffect (samples)) printf (" \007 " );
147152 }
148153
You canโt perform that action at this time.
0 commit comments