Skip to content

Commit 4dccd28

Browse files
maciejmakowski2003Maciej Makowski
andauthored
chore: released 0.7.0-rc.1 (#567)
Co-authored-by: Maciej Makowski <maciej.makowski2608@gmail.com>
1 parent fedd31c commit 4dccd28

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

apps/fabric-example/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ PODS:
22432243
- React-perflogger (= 0.80.0)
22442244
- React-utils (= 0.80.0)
22452245
- SocketRocket
2246-
- RNAudioAPI (0.7.0-rc.0):
2246+
- RNAudioAPI (0.7.0-rc.1):
22472247
- boost
22482248
- DoubleConversion
22492249
- fast_float
@@ -2270,10 +2270,10 @@ PODS:
22702270
- ReactCodegen
22712271
- ReactCommon/turbomodule/bridging
22722272
- ReactCommon/turbomodule/core
2273-
- RNAudioAPI/audioapi (= 0.7.0-rc.0)
2273+
- RNAudioAPI/audioapi (= 0.7.0-rc.1)
22742274
- SocketRocket
22752275
- Yoga
2276-
- RNAudioAPI/audioapi (0.7.0-rc.0):
2276+
- RNAudioAPI/audioapi (0.7.0-rc.1):
22772277
- boost
22782278
- DoubleConversion
22792279
- fast_float
@@ -2300,10 +2300,10 @@ PODS:
23002300
- ReactCodegen
23012301
- ReactCommon/turbomodule/bridging
23022302
- ReactCommon/turbomodule/core
2303-
- RNAudioAPI/audioapi/ios (= 0.7.0-rc.0)
2303+
- RNAudioAPI/audioapi/ios (= 0.7.0-rc.1)
23042304
- SocketRocket
23052305
- Yoga
2306-
- RNAudioAPI/audioapi/ios (0.7.0-rc.0):
2306+
- RNAudioAPI/audioapi/ios (0.7.0-rc.1):
23072307
- boost
23082308
- DoubleConversion
23092309
- fast_float
@@ -2955,7 +2955,7 @@ SPEC CHECKSUMS:
29552955
ReactAppDependencyProvider: 3267432b637c9b38e86961b287f784ee1b08dde0
29562956
ReactCodegen: d82f538f70f00484d418803f74b5a0ea09cc8689
29572957
ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147
2958-
RNAudioAPI: 2c9c0bd9aa0a5a0c99cd095b8548e855040255ec
2958+
RNAudioAPI: 039e636daed217cecbbdcf0228388124763acd11
29592959
RNGestureHandler: eeb622199ef1fb3a076243131095df1c797072f0
29602960
RNReanimated: 402e6a3b84071df4da6264630a1b99962a113d2d
29612961
RNScreens: ee2abe7e0c548eed14e92742e81ed991165c56aa

packages/react-native-audio-api/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -219,31 +219,31 @@ JSI_HOST_FUNCTION(createBufferQueueSource) {
219219
return promise;
220220
}
221221

222-
JSI_HOST_FUNCTION(decodePCMAudioDataInBase64) {
223-
auto b64 = args[0].getString(runtime).utf8(runtime);
224-
auto playbackSpeed = static_cast<float>(args[1].getNumber());
225-
226-
auto promise = promiseVendor_->createPromise([this, b64, playbackSpeed](std::shared_ptr<Promise> promise) {
227-
std::thread([this, b64, playbackSpeed, promise = std::move(promise)]() {
228-
auto results = context_->decodeWithPCMInBase64(b64, playbackSpeed);
229-
230-
if (!results) {
231-
promise->reject("Failed to decode audio data source.");
232-
return;
233-
}
234-
235-
auto audioBufferHostObject = std::make_shared<AudioBufferHostObject>(results);
236-
237-
promise->resolve([audioBufferHostObject = std::move(audioBufferHostObject)](jsi::Runtime &runtime) {
238-
auto jsiObject = jsi::Object::createFromHostObject(runtime, audioBufferHostObject);
239-
jsiObject.setExternalMemoryPressure(runtime, audioBufferHostObject->getSizeInBytes());
240-
return jsiObject;
241-
});
242-
}).detach();
243-
});
222+
JSI_HOST_FUNCTION(decodePCMAudioDataInBase64) {
223+
auto b64 = args[0].getString(runtime).utf8(runtime);
224+
auto playbackSpeed = static_cast<float>(args[1].getNumber());
225+
226+
auto promise = promiseVendor_->createPromise([this, b64, playbackSpeed](std::shared_ptr<Promise> promise) {
227+
std::thread([this, b64, playbackSpeed, promise = std::move(promise)]() {
228+
auto results = context_->decodeWithPCMInBase64(b64, playbackSpeed);
229+
230+
if (!results) {
231+
promise->reject("Failed to decode audio data source.");
232+
return;
233+
}
234+
235+
auto audioBufferHostObject = std::make_shared<AudioBufferHostObject>(results);
236+
237+
promise->resolve([audioBufferHostObject = std::move(audioBufferHostObject)](jsi::Runtime &runtime) {
238+
auto jsiObject = jsi::Object::createFromHostObject(runtime, audioBufferHostObject);
239+
jsiObject.setExternalMemoryPressure(runtime, audioBufferHostObject->getSizeInBytes());
240+
return jsiObject;
241+
});
242+
}).detach();
243+
});
244244

245-
return promise;
246-
}
245+
return promise;
246+
}
247247

248248
protected:
249249
std::shared_ptr<BaseAudioContext> context_;

packages/react-native-audio-api/common/cpp/audioapi/core/BaseAudioContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ std::shared_ptr<AudioBuffer> BaseAudioContext::decodeAudioData(
141141
}
142142

143143
std::shared_ptr<AudioBuffer> BaseAudioContext::decodeWithPCMInBase64(
144-
const std::string &data) {
145-
auto audioBus = audioDecoder_->decodeWithPCMInBase64(data);
144+
const std::string &data, float playbackSpeed) {
145+
auto audioBus = audioDecoder_->decodeWithPCMInBase64(data, playbackSpeed);
146146

147147
if (!audioBus) {
148148
return nullptr;

packages/react-native-audio-api/common/cpp/audioapi/core/BaseAudioContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class BaseAudioContext {
5959

6060
std::shared_ptr<AudioBuffer> decodeAudioDataSource(const std::string &path);
6161
std::shared_ptr<AudioBuffer> decodeAudioData(const void *data, size_t size);
62-
std::shared_ptr<AudioBuffer> decodeWithPCMInBase64(const std::string &data);
62+
std::shared_ptr<AudioBuffer> decodeWithPCMInBase64(const std::string &data, float playbackSpeed);
6363

6464
std::shared_ptr<PeriodicWave> getBasicWaveForm(OscillatorType type);
6565
[[nodiscard]] float getNyquistFrequency() const;

packages/react-native-audio-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-audio-api",
3-
"version": "0.7.0-rc.0",
3+
"version": "0.7.0-rc.1",
44
"description": "react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification",
55
"bin": {
66
"setup-rn-audio-api-web": "./scripts/setup-rn-audio-api-web.js"

0 commit comments

Comments
 (0)