@siteed/expo-audio-studio 2.10.3 → 2.10.5
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.
- package/CHANGELOG.md +11 -1
- package/ios/AudioStreamManager.swift +14 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
## [2.10.5] - 2025-06-04
|
|
12
|
+
### Changed
|
|
13
|
+
- fix(expo-audio-studio): enable audio streaming when primary output is disabled on iOS (#259) ([1d2bb92](https://github.com/deeeed/expo-audio-stream/commit/1d2bb9280e7d596ed77de30b37e043fd7f8f8cc8))
|
|
14
|
+
- chore(expo-audio-studio): release @siteed/expo-audio-studio@2.10.4 ([32f8c9e](https://github.com/deeeed/expo-audio-stream/commit/32f8c9ee1d65f52370798654be389de1569e851f))
|
|
15
|
+
## [2.10.4] - 2025-06-03
|
|
16
|
+
### Changed
|
|
17
|
+
- fix(expo-audio-studio): resolve Swift compilation scope error in AudioStreamManager (#256) ([b44bf3d](https://github.com/deeeed/expo-audio-stream/commit/b44bf3d6d85a3f953d84b024bba828163354a40b))
|
|
18
|
+
- chore(expo-audio-studio): release @siteed/expo-audio-studio@2.10.3 ([5e23474](https://github.com/deeeed/expo-audio-stream/commit/5e23474f9d0b0bcf643098b85779d413d0dc9348))
|
|
11
19
|
## [2.10.3] - 2025-06-02
|
|
12
20
|
### Changed
|
|
13
21
|
- fix: prevent UninitializedPropertyAccessException crash in developer menu (#250) ([83c1fd7](https://github.com/deeeed/expo-audio-stream/commit/83c1fd75c9aa022eab1125df251700e3e87c4371))
|
|
@@ -270,7 +278,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
270
278
|
- Feature: Audio features extraction during recording.
|
|
271
279
|
- Feature: Consistent WAV PCM recording format across all platforms.
|
|
272
280
|
|
|
273
|
-
[unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.
|
|
281
|
+
[unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.5...HEAD
|
|
282
|
+
[2.10.5]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.4...@siteed/expo-audio-studio@2.10.5
|
|
283
|
+
[2.10.4]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.3...@siteed/expo-audio-studio@2.10.4
|
|
274
284
|
[2.10.3]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.2...@siteed/expo-audio-studio@2.10.3
|
|
275
285
|
[2.10.2]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.1...@siteed/expo-audio-studio@2.10.2
|
|
276
286
|
[2.10.1]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.0...@siteed/expo-audio-studio@2.10.1
|
|
@@ -696,12 +696,12 @@ class AudioStreamManager: NSObject, AudioDeviceManagerDelegate {
|
|
|
696
696
|
// Create the default tap block if none provided
|
|
697
697
|
let tapBlock = customTapBlock ?? { [weak self] (buffer, time) in
|
|
698
698
|
guard let self = self,
|
|
699
|
-
let fileURL = self.recordingFileURL,
|
|
700
699
|
self.isRecording else {
|
|
701
700
|
return
|
|
702
701
|
}
|
|
703
|
-
//
|
|
704
|
-
|
|
702
|
+
// Process audio buffer for streaming, analysis, and optional file writing
|
|
703
|
+
// Note: Audio streaming works regardless of primary output settings (consistent with Web/Android)
|
|
704
|
+
self.processAudioBuffer(buffer)
|
|
705
705
|
self.lastBufferTime = time
|
|
706
706
|
}
|
|
707
707
|
|
|
@@ -1400,12 +1400,12 @@ class AudioStreamManager: NSObject, AudioDeviceManagerDelegate {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
|
|
1402
1402
|
/// Processes the audio buffer: handles resampling/format conversion if necessary,
|
|
1403
|
-
/// writes the result to the WAV file on a background thread
|
|
1404
|
-
/// analysis processing and event emission based on intervals.
|
|
1403
|
+
/// optionally writes the result to the WAV file on a background thread (if primary output is enabled),
|
|
1404
|
+
/// and triggers analysis processing and event emission based on intervals.
|
|
1405
|
+
/// Audio streaming happens regardless of file output settings.
|
|
1405
1406
|
/// - Parameters:
|
|
1406
1407
|
/// - buffer: The audio buffer received from the input node tap.
|
|
1407
|
-
|
|
1408
|
-
private func processAudioBuffer(_ buffer: AVAudioPCMBuffer, fileURL: URL) {
|
|
1408
|
+
private func processAudioBuffer(_ buffer: AVAudioPCMBuffer) {
|
|
1409
1409
|
guard let settings = recordingSettings else {
|
|
1410
1410
|
Logger.debug("processAudioBuffer: Recording settings not available")
|
|
1411
1411
|
return
|
|
@@ -1465,9 +1465,9 @@ class AudioStreamManager: NSObject, AudioDeviceManagerDelegate {
|
|
|
1465
1465
|
// Create an immutable copy for background/event emission
|
|
1466
1466
|
let dataToWrite = Data(bytes: bufferData, count: Int(audioData.mDataByteSize))
|
|
1467
1467
|
|
|
1468
|
-
// --- Background File Writing ---
|
|
1469
|
-
|
|
1470
|
-
|
|
1468
|
+
// --- Background File Writing (Optional) ---
|
|
1469
|
+
// Only write to file if primary output is enabled
|
|
1470
|
+
if settings.output.primary.enabled {
|
|
1471
1471
|
// Use the persistent fileHandle opened during preparation.
|
|
1472
1472
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
|
1473
1473
|
guard let self = self, let handle = self.fileHandle else {
|
|
@@ -1488,7 +1488,8 @@ class AudioStreamManager: NSObject, AudioDeviceManagerDelegate {
|
|
|
1488
1488
|
self.totalDataSize += Int64(dataToWrite.count)
|
|
1489
1489
|
}
|
|
1490
1490
|
|
|
1491
|
-
// --- Event Emission & Analysis ---
|
|
1491
|
+
// --- Event Emission & Analysis (Always Happens) ---
|
|
1492
|
+
// Audio streaming is independent of file output settings
|
|
1492
1493
|
accumulatedData.append(dataToWrite)
|
|
1493
1494
|
accumulatedAnalysisData.append(dataToWrite)
|
|
1494
1495
|
|
|
@@ -1791,7 +1792,7 @@ class AudioStreamManager: NSObject, AudioDeviceManagerDelegate {
|
|
|
1791
1792
|
|
|
1792
1793
|
let result = RecordingResult(
|
|
1793
1794
|
fileUri: compression?.compressedFileUri ?? "", // Use compressed URI if available
|
|
1794
|
-
filename: compression != nil ? (
|
|
1795
|
+
filename: compression != nil ? (compressedFileURL?.lastPathComponent ?? "compressed-audio") : "stream-only",
|
|
1795
1796
|
mimeType: compression?.mimeType ?? mimeType,
|
|
1796
1797
|
duration: durationMs,
|
|
1797
1798
|
size: compression?.size ?? totalDataSize,
|
|
@@ -2104,7 +2105,7 @@ class AudioStreamManager: NSObject, AudioDeviceManagerDelegate {
|
|
|
2104
2105
|
guard let self = self, self.isRecording else { return }
|
|
2105
2106
|
|
|
2106
2107
|
// Process the buffer normally - processAudioBuffer handles all emission logic
|
|
2107
|
-
self.processAudioBuffer(buffer
|
|
2108
|
+
self.processAudioBuffer(buffer)
|
|
2108
2109
|
self.lastBufferTime = time
|
|
2109
2110
|
}
|
|
2110
2111
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siteed/expo-audio-studio",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.5",
|
|
4
4
|
"description": "Comprehensive audio processing library for React Native and Expo with recording, analysis, visualization, and streaming capabilities across iOS, Android, and web",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|