@siteed/expo-audio-studio 2.10.4 → 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 CHANGED
@@ -8,6 +8,10 @@ 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))
11
15
  ## [2.10.4] - 2025-06-03
12
16
  ### Changed
13
17
  - fix(expo-audio-studio): resolve Swift compilation scope error in AudioStreamManager (#256) ([b44bf3d](https://github.com/deeeed/expo-audio-stream/commit/b44bf3d6d85a3f953d84b024bba828163354a40b))
@@ -274,7 +278,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
274
278
  - Feature: Audio features extraction during recording.
275
279
  - Feature: Consistent WAV PCM recording format across all platforms.
276
280
 
277
- [unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.10.4...HEAD
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
278
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
279
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
280
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
@@ -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
- // processAudioBuffer will handle resampling if needed
704
- self.processAudioBuffer(buffer, fileURL: fileURL)
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, and triggers
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
- /// - fileURL: The URL of the file to write the data to (ignored, uses self.fileHandle).
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
- // Only write to file if primary output is enabled
1470
- if settings.output.primary.enabled {
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
 
@@ -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, fileURL: self.recordingFileURL!)
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.4",
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",