react-native-audio-api 0.11.0-nightly-c9f9522-20251218 → 0.11.0-nightly-568a154-20251220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#include <android/log.h>
|
|
2
1
|
#include <audioapi/android/core/AndroidAudioRecorder.h>
|
|
3
2
|
#include <audioapi/android/core/utils/AndroidFileWriterBackend.h>
|
|
4
3
|
#include <audioapi/android/core/utils/AndroidRecorderCallback.h>
|
|
@@ -143,6 +142,7 @@ Result<std::string, std::string> AndroidAudioRecorder::start() {
|
|
|
143
142
|
}
|
|
144
143
|
|
|
145
144
|
if (isConnected()) {
|
|
145
|
+
deinterleavingBuffer_ = std::make_shared<AudioArray>(streamMaxBufferSizeInFrames_);
|
|
146
146
|
adapterNode_->init(streamMaxBufferSizeInFrames_, streamChannelCount_);
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -324,9 +324,9 @@ void AndroidAudioRecorder::clearOnAudioReadyCallback() {
|
|
|
324
324
|
void AndroidAudioRecorder::connect(const std::shared_ptr<RecorderAdapterNode> &node) {
|
|
325
325
|
std::scoped_lock adapterLock(adapterNodeMutex_);
|
|
326
326
|
adapterNode_ = node;
|
|
327
|
-
deinterleavingBuffer_ = std::make_shared<AudioArray>(streamMaxBufferSizeInFrames_);
|
|
328
327
|
|
|
329
328
|
if (!isIdle()) {
|
|
329
|
+
deinterleavingBuffer_ = std::make_shared<AudioArray>(streamMaxBufferSizeInFrames_);
|
|
330
330
|
adapterNode_->init(streamMaxBufferSizeInFrames_, streamChannelCount_);
|
|
331
331
|
}
|
|
332
332
|
|
|
@@ -51,6 +51,9 @@ AudioRecorderCallback::~AudioRecorderCallback() {
|
|
|
51
51
|
void AudioRecorderCallback::emitAudioData(bool flush) {
|
|
52
52
|
size_t sizeLimit = flush ? circularBus_[0]->getNumberOfAvailableFrames() : bufferLength_;
|
|
53
53
|
|
|
54
|
+
if (sizeLimit == 0) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
54
57
|
while (circularBus_[0]->getNumberOfAvailableFrames() >= sizeLimit) {
|
|
55
58
|
auto bus = std::make_shared<AudioBus>(sizeLimit, channelCount_, sampleRate_);
|
|
56
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-audio-api",
|
|
3
|
-
"version": "0.11.0-nightly-
|
|
3
|
+
"version": "0.11.0-nightly-568a154-20251220",
|
|
4
4
|
"description": "react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification",
|
|
5
5
|
"bin": {
|
|
6
6
|
"setup-rn-audio-api-web": "./scripts/setup-rn-audio-api-web.js"
|