sezo-audio-engine 0.0.7 → 0.0.8

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/README.md CHANGED
@@ -38,7 +38,7 @@ allprojects {
38
38
  Optionally pin the engine version in `android/gradle.properties`:
39
39
 
40
40
  ```properties
41
- sezoAudioEngineVersion=android-engine-v0.1.3
41
+ sezoAudioEngineVersion=android-engine-v0.1.4
42
42
  ```
43
43
 
44
44
  If you want to build from source instead, include the local engine module in
@@ -44,7 +44,7 @@ dependencies {
44
44
  if (androidEngineProject != null) {
45
45
  implementation androidEngineProject
46
46
  } else {
47
- def sezoAudioEngineVersion = project.findProperty("sezoAudioEngineVersion") ?: "android-engine-v0.1.3"
47
+ def sezoAudioEngineVersion = project.findProperty("sezoAudioEngineVersion") ?: "android-engine-v0.1.4"
48
48
  implementation "com.github.Sepzie:SezoAudioEngine:${sezoAudioEngineVersion}"
49
49
  }
50
50
  }
@@ -13,6 +13,7 @@ class ExpoAudioEngineModule : Module() {
13
13
  private val pendingExtractions = Collections.synchronizedMap(mutableMapOf<Long, PendingExtraction>())
14
14
  private val progressLogState = Collections.synchronizedMap(mutableMapOf<Long, Float>())
15
15
  private var lastExtractionJobId: Long? = null
16
+ private var activeRecordingFormat: String = "aac"
16
17
 
17
18
  private data class PendingExtraction(
18
19
  val promise: Promise,
@@ -244,6 +245,7 @@ class ExpoAudioEngineModule : Module() {
244
245
  throw Exception("Failed to start recording")
245
246
  }
246
247
 
248
+ activeRecordingFormat = format
247
249
  Log.d(TAG, "Recording started successfully")
248
250
  }
249
251
 
@@ -268,7 +270,7 @@ class ExpoAudioEngineModule : Module() {
268
270
  "startTimeSamples" to result.startTimeSamples,
269
271
  "sampleRate" to 44100,
270
272
  "channels" to 1,
271
- "format" to "aac",
273
+ "format" to activeRecordingFormat,
272
274
  "fileSize" to result.fileSize
273
275
  )
274
276
  )
@@ -280,7 +282,7 @@ class ExpoAudioEngineModule : Module() {
280
282
  "startTimeSamples" to result.startTimeSamples,
281
283
  "sampleRate" to 44100,
282
284
  "channels" to 1,
283
- "format" to "aac",
285
+ "format" to activeRecordingFormat,
284
286
  "fileSize" to result.fileSize
285
287
  )
286
288
  }
@@ -17,7 +17,7 @@ export interface AudioTrack {
17
17
  export interface RecordingConfig {
18
18
  sampleRate?: number;
19
19
  channels?: number;
20
- format?: 'aac' | 'mp3' | 'wav';
20
+ format?: 'aac' | 'm4a' | 'mp3' | 'wav';
21
21
  bitrate?: number;
22
22
  quality?: 'low' | 'medium' | 'high';
23
23
  enableNoiseGate?: boolean;
@@ -30,12 +30,12 @@ export interface RecordingResult {
30
30
  startTimeSamples?: number;
31
31
  sampleRate: number;
32
32
  channels: number;
33
- format: 'aac' | 'mp3' | 'wav';
33
+ format: 'aac' | 'm4a' | 'mp3' | 'wav';
34
34
  bitrate?: number;
35
35
  fileSize: number;
36
36
  }
37
37
  export interface ExtractionConfig {
38
- format?: 'aac' | 'mp3' | 'wav';
38
+ format?: 'aac' | 'm4a' | 'mp3' | 'wav';
39
39
  bitrate?: number;
40
40
  includeEffects?: boolean;
41
41
  outputDir?: string;
@@ -44,7 +44,7 @@ export interface ExtractionResult {
44
44
  trackId?: string;
45
45
  uri: string;
46
46
  duration: number;
47
- format: 'aac' | 'mp3' | 'wav';
47
+ format: 'aac' | 'm4a' | 'mp3' | 'wav';
48
48
  bitrate?: number;
49
49
  fileSize: number;
50
50
  }
@@ -803,6 +803,9 @@ final class NativeAudioEngine {
803
803
  if requestedFormat == "wav" {
804
804
  return ("wav", "wav")
805
805
  }
806
+ if requestedFormat == "m4a" {
807
+ return ("m4a", "m4a")
808
+ }
806
809
  if requestedFormat == "mp3" {
807
810
  return ("aac", "m4a")
808
811
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sezo-audio-engine",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Cross-platform Expo module for the Sezo Audio Engine with iOS implementation and background playback.",
5
5
  "license": "MIT",
6
6
  "author": "Sezo",