@@ -58,7 +58,8 @@ void stream_test_record() {
5858 static StreamRecording * recording = new StreamRecording ( *input );
5959 static MixerChannel * output = uBit.audio .mixer .addChannel ( *recording );
6060
61- input->requestSampleRate ( 11000 );
61+ // FIXME: Update this to use the new requestSampleRate
62+ // input->requestSampleRate( 11000 );
6263 output->setSampleRate ( 11000 );
6364 output->setVolume ( CONFIG_MIXER_INTERNAL_RANGE * 0.8 ); // 80% volume
6465
@@ -67,7 +68,8 @@ void stream_test_record() {
6768 uBit.display .printChar ( ' 1' , 1000 );
6869
6970 uBit.display .printChar ( ' R' );
70- input->requestSampleRate ( 11000 );
71+ // FIXME: Update this to use the new requestSampleRate
72+ // input->requestSampleRate( 11000 );
7173 recording->recordAsync ();
7274 while ( recording->isRecording () ) {
7375 uBit.display .printChar ( ' ~' );
@@ -99,7 +101,8 @@ static const int STRSR_SAMPLE_RATE = 11000;
99101
100102static void strsr_handle_buttonA (MicroBitEvent) {
101103 static SplitterChannel *splitterChannel = uBit.audio .splitter ->createChannel ();
102- splitterChannel->requestSampleRate (STRSR_SAMPLE_RATE);
104+ // FIXME: Update this to use the new requestSampleRate
105+ // splitterChannel->requestSampleRate(STRSR_SAMPLE_RATE);
103106 static StreamRecording *recording = new StreamRecording (*splitterChannel);
104107 static MixerChannel *channel = uBit.audio .mixer .addChannel (*recording, STRSR_SAMPLE_RATE);
105108
@@ -114,20 +117,24 @@ static void strsr_handle_buttonA(MicroBitEvent) {
114117 uBit.display .clear ();
115118 uBit.audio .levelSPL ->setUnit (LEVEL_DETECTOR_SPL_8BIT);
116119
117- splitterChannel->requestSampleRate ( STRSR_SAMPLE_RATE );
120+ // FIXME: Update this to use the new requestSampleRate
121+ // splitterChannel->requestSampleRate( STRSR_SAMPLE_RATE );
118122
119123 DMESG ( " RECORDING" );
120124 recording->recordAsync ();
121125 bool showR = true ;
122126 while (uBit.buttonA .isPressed ()) {
123127 if ( uBit.logo .isPressed () ) {
124- splitterChannel->requestSampleRate ( abs ((uBit.accelerometer .getRoll ()-90 ) * 100 ) );
128+ // FIXME: Update this to use the new requestSampleRate
129+ // splitterChannel->requestSampleRate( abs((uBit.accelerometer.getRoll()-90) * 100) );
125130 DMESG ( " Sample Rate: %d (mic = %d)" , (int )splitterChannel->getSampleRate (), (int )uBit.audio .mic ->getSampleRate () );
126131 } else {
127- if ( uBit.buttonB .isPressed () )
128- splitterChannel->requestSampleRate ( 5000 );
129- else
130- splitterChannel->requestSampleRate ( STRSR_SAMPLE_RATE );
132+ if ( uBit.buttonB .isPressed () ) {}
133+ // FIXME: Update this to use the new requestSampleRate
134+ // splitterChannel->requestSampleRate( 5000 );
135+ else {}
136+ // FIXME: Update this to use the new requestSampleRate
137+ // splitterChannel->requestSampleRate( STRSR_SAMPLE_RATE );
131138 }
132139
133140 if (showR)
0 commit comments