diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index f5aade3766..759d4a7656 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -223,8 +223,8 @@ Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY; Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY; async () => { const result = await Audio.Sound.create({uri: 'uri'}, { - volume: 0.5, - rate: 0.6 + volume: 0.55, + rate: 16.5 }, null, true); const sound = result.sound; diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index f1902d853c..2d73618253 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -554,10 +554,12 @@ export interface PlaybackStatusToSet { isMuted?: boolean; positionMillis?: number; progressUpdateIntervalMillis?: number; - rate?: FloatFromZeroToOne; + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate?: number; shouldCorrectPitch?: boolean; shouldPlay?: boolean; - volume?: FloatFromZeroToOne; + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume?: number; } export type PlaybackSource = RequireSource | { uri: string } | Asset; @@ -670,7 +672,6 @@ export class PlaybackObject { setRateAsync( /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ rate: number, - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ shouldCorrectPitch: boolean ): Promise;