Skip to content

Commit 4746fbf

Browse files
maciejmakowski2003Maciej Makowski
andauthored
Fix/audio converter (#245)
* refactor: refactored ios audio decoding * refactor: refactored native folders structure * refactor: removed unused prop from AudioParam * refactor: share AudioDecoder header between ios and android * refactor: refactored FFtFrame impl per platform * ci: yarn lint fix * fix: fixed .clang-format * fix: fixed cpplint version --------- Co-authored-by: Maciej Makowski <maciej.makowski2608@gmail.com>
1 parent 4233887 commit 4746fbf

38 files changed

+112
-302
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414

1515
- name: Install cpplint
1616
shell: bash
17-
run: pip install 'cpplint==1.6.1'
17+
run: pip install 'cpplint==2.0.0'
1818

1919
- name: Install ktlint
2020
shell: bash

apps/fabric-example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2152,7 +2152,7 @@ SPEC CHECKSUMS:
21522152
React-utils: e74516d5b9483c5530ec61e249e28b88729321d2
21532153
ReactCodegen: ff7512e124e3dc1363a4930a209d033354d2042a
21542154
ReactCommon: cde69a75746e8d7131f61c27155ee9dc42117003
2155-
RNAudioAPI: edc2f2460642e089af187b2a8e44fd750155c70f
2155+
RNAudioAPI: 6910ec8d0609b3dc4072a8d6aafa9b8bfdd28406
21562156
RNGestureHandler: e1dcb274c17ca0680a04d7ff357e35e37c384185
21572157
RNReanimated: 4335a2d4b358c01a28fe1881db59d897e8724681
21582158
RNScreens: 74536418fef8086457d39df36a55b36efd5329c9

packages/react-native-audio-api/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ SpacesInContainerLiterals: true
8181
SpacesInCStyleCastParentheses: false
8282
SpacesInParentheses: false
8383
SpacesInSquareBrackets: false
84-
Standard: Cpp11
84+
Standard: Cpp17
8585
TabWidth: 4
8686
UseTab: Never
8787
---

packages/react-native-audio-api/RNAudioAPI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616

1717
s.source_files = "ios/**/*.{h,m,mm}", "common/cpp/**/*.{hpp,cpp,c,h}"
1818

19-
s.ios.frameworks = 'Accelerate'
19+
s.ios.frameworks = 'CoreFoundation', 'CoreAudio', 'AudioToolbox', 'Accelerate'
2020
s.xcconfig = {
2121
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) HAVE_ACCELERATE=1'
2222
}

packages/react-native-audio-api/android/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ file(GLOB_RECURSE SOURCE_FILES
2828
"../common/cpp/jsi/*.h"
2929
"../common/cpp/jsi/*.cpp"
3030
"../common/cpp/types/*.h"
31+
"../common/cpp/libs/*.h"
3132
)
3233

3334
add_library(react-native-audio-api SHARED ${SOURCE_FILES})

packages/react-native-audio-api/android/src/main/cpp/AudioDecoder/AudioDecoder.cpp renamed to packages/react-native-audio-api/android/src/main/cpp/core/AudioDecoder.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
namespace audioapi {
1111

12-
AudioDecoder::AudioDecoder(int sampleRate) : sampleRate_(sampleRate) {}
13-
1412
AudioBus *AudioDecoder::decodeWithFilePath(const std::string &path) const {
1513
ma_decoder decoder;
1614
ma_decoder_config config =
@@ -55,10 +53,4 @@ AudioBus *AudioDecoder::decodeWithFilePath(const std::string &path) const {
5553

5654
return audioBus;
5755
}
58-
59-
AudioBus *AudioDecoder::decodeWithArrayBuffer() const {
60-
// TODO: implement this
61-
return new AudioBus(1, 1, 1);
62-
}
63-
6456
} // namespace audioapi

0 commit comments

Comments
 (0)