react-native-audio-api 0.5.2 → 0.5.3

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.
@@ -164,6 +164,8 @@
164
164
  NSLog(@"Error while activating audio session: %@", [error debugDescription]);
165
165
  return;
166
166
  }
167
+
168
+ self.isInterrupted = false;
167
169
  }
168
170
 
169
171
  - (void)setupAndInitNotificationHandlers
@@ -175,11 +177,11 @@
175
177
  [self.notificationCenter addObserver:self
176
178
  selector:@selector(handleEngineConfigurationChange:)
177
179
  name:AVAudioEngineConfigurationChangeNotification
178
- object:self];
180
+ object:nil];
179
181
  [self.notificationCenter addObserver:self
180
182
  selector:@selector(handleInterruption:)
181
183
  name:AVAudioSessionInterruptionNotification
182
- object:self];
184
+ object:nil];
183
185
  }
184
186
 
185
187
  - (void)connectAudioEngine
@@ -198,6 +200,8 @@
198
200
  NSLog(@"Error starting audio engine: %@", [error debugDescription]);
199
201
  }
200
202
  }
203
+
204
+ self.configurationChanged = false;
201
205
  }
202
206
 
203
207
  - (void)handleEngineConfigurationChange:(NSNotification *)notification
@@ -227,12 +231,7 @@
227
231
  return;
228
232
  }
229
233
 
230
- bool success = [self.audioSession setActive:true error:&error];
231
-
232
- if (!success) {
233
- NSLog(@"ERror: %@", [error debugDescription]);
234
- return;
235
- }
234
+ [self setupAndInitAudioSession];
236
235
 
237
236
  if (self.configurationChanged && self.isRunning) {
238
237
  dispatch_async(dispatch_get_main_queue(), ^{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
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"