Skip to content

Commit

Permalink
add ios encodingType wav (#556)
Browse files Browse the repository at this point in the history
Co-authored-by: leedongwook-kr <63283076+leedongwook-kr@users.noreply.github.com>
  • Loading branch information
ddowoo and ddowoo committed Oct 9, 2023
1 parent 3d02edf commit 1df9e56
Show file tree
Hide file tree
Showing 3 changed files with 5,994 additions and 3,031 deletions.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export enum AVEncodingOption {
amr = 'amr',
flac = 'flac',
opus = 'opus',
wav = 'wav',
}

type AVEncodingType =
Expand All @@ -77,7 +78,8 @@ type AVEncodingType =
| AVEncodingOption.alac
| AVEncodingOption.amr
| AVEncodingOption.flac
| AVEncodingOption.opus;
| AVEncodingOption.opus
| AVEncodingOption.wav;

export enum AVModeIOSOption {
gamechat = 'gamechat',
Expand Down
2 changes: 2 additions & 0 deletions ios/RNAudioRecorderPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ class RNAudioRecorderPlayer: RCTEventEmitter, AVAudioRecorderDelegate {
}
} else if (encoding == "opus") {
avFormat = Int(kAudioFormatOpus)
} else if (encoding == "wav") {
avFormat = Int(kAudioFormatLinearPCM)
}
}

Expand Down
Loading

0 comments on commit 1df9e56

Please sign in to comment.