Skip to content

Commit 710a8bf

Browse files
author
maciejmakowski2003
committed
fix: fixed small nitpicks
1 parent 5509944 commit 710a8bf

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

apps/common-app/src/examples/PlaybackSpeed/PlaybackSpeed.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React, {
66
useCallback,
77
useMemo,
88
} from 'react';
9-
import { ActivityIndicator, View, StyleSheet } from 'react-native';
9+
import { View, StyleSheet } from 'react-native';
1010
import { Container, Button, Spacer, Slider, Select } from '../../components';
1111
import { AudioContext } from 'react-native-audio-api';
1212
import type { AudioBufferSourceNode } from 'react-native-audio-api';
@@ -33,7 +33,7 @@ const PlaybackSpeed: FC = () => {
3333

3434
const initializeAudioContext = useCallback(() => {
3535
if (!aCtxRef.current) {
36-
aCtxRef.current = new AudioContext();
36+
aCtxRef.current = new AudioContext({ sampleRate: 44100 });
3737
}
3838
return aCtxRef.current;
3939
}, []);
@@ -151,10 +151,6 @@ const PlaybackSpeed: FC = () => {
151151
</View>
152152

153153
<View style={styles.controlsContainer}>
154-
{isLoading && (
155-
<ActivityIndicator color="#FFFFFF" style={styles.loadingIndicator} />
156-
)}
157-
158154
<Button
159155
title={isPlaying ? 'Stop' : 'Play'}
160156
onPress={togglePlayPause}
@@ -187,10 +183,6 @@ const styles = StyleSheet.create({
187183
justifyContent: 'center',
188184
alignItems: 'center',
189185
},
190-
loadingIndicator: {
191-
position: 'absolute',
192-
top: -40,
193-
},
194186
});
195187

196188
export default PlaybackSpeed;

0 commit comments

Comments
 (0)