UNPKG

@siteed/expo-audio-studio

Version:

Comprehensive audio processing library for React Native and Expo with recording, analysis, visualization, and streaming capabilities across iOS, Android, and web

19 lines (17 loc) 429 B
import { BitDepth, EncodingType } from '../ExpoAudioStream.types' export const encodingToBitDepth = ({ encoding, }: { encoding: EncodingType }): BitDepth => { switch (encoding) { case 'pcm_32bit': return 32 case 'pcm_16bit': return 16 case 'pcm_8bit': return 8 default: throw new Error(`Unsupported encoding type: ${encoding}`) } }