[go: nahoru, domu]

Skip to content

Commit

Permalink
fix: Regression on creation sequence when disposing AudioRecorder w…
Browse files Browse the repository at this point in the history
…ithout using it.
  • Loading branch information
llfbandit committed Dec 21, 2023
1 parent 3f042ff commit eeccb0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions record/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.0.4
* fix: Regression on creation sequence when disposing `AudioRecorder` without using it.

## 5.0.3
* fix: Regression on creation sequence when disposing `AudioRecorder` without using it.

Expand Down
4 changes: 3 additions & 1 deletion record/lib/src/record.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ class AudioRecorder {
_stateStreamSubscription?.cancel();
_stateStreamCtrl.close();

await RecordPlatform.instance.dispose(_recorderId);
if (_created != null) {
await RecordPlatform.instance.dispose(_recorderId);
}

await _stopRecordStream();
}
Expand Down
2 changes: 1 addition & 1 deletion record/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: record
description: Audio recorder from microphone to file or stream with multiple codecs, bit rate and sampling rate options.
version: 5.0.3
version: 5.0.4
homepage: https://github.com/llfbandit/record/tree/master/record

environment:
Expand Down

0 comments on commit eeccb0f

Please sign in to comment.