Skip to content

Commit 3861e9f

Browse files
committed
test-volumestream.ino with global variable
1 parent a8af1b6 commit 3861e9f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/tests/conversion/test-volumestream/test-volumestream.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ SineWaveGenerator<int16_t> sineWave(32000); // subclass of SoundG
1212
GeneratedSoundStream<int16_t> sound(sineWave);
1313
CsvOutput<int16_t> out(Serial);
1414
VolumeStream vol(out);
15-
StreamCopy copier(vol, sound); // copies sound to out
15+
StreamCopy copier(vol, sound);
16+
float f_volume = 0.1;
1617

1718
// Arduino Setup
1819
void setup(void) {
@@ -23,7 +24,7 @@ void setup(void) {
2324
// Define CSV Output
2425
out.begin(audio_info);
2526
vol.begin(audio_info);
26-
vol.setVolume(0.1);
27+
vol.setVolume(f_volume);
2728

2829
// Setup sine wave
2930
sineWave.begin(audio_info, N_B4);

0 commit comments

Comments
 (0)