Skip to content

Commit

Permalink
Code formatting and CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Oct 29, 2024
1 parent 68059fe commit 4322bf7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions just_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.42

* Fix dealloc crash on iOS/macOS (@cristian1980).

## 0.9.41

* Fix stop() to cause play() to return on iOS.
Expand Down
6 changes: 4 additions & 2 deletions just_audio/darwin/Classes/AudioPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -1326,13 +1326,15 @@ - (void)seek:(CMTime)position index:(NSNumber *)newIndex completionHandler:(void
}
}

- (void)dispose:(BOOL) calledFromDealloc {
- (void)dispose:(BOOL)calledFromDealloc {
if (!_player) return;
if (_processingState != none) {
[_player pause];

[self updatePosition];
if(!calledFromDealloc)[self broadcastPlaybackEvent];
if (!calledFromDealloc) {
[self broadcastPlaybackEvent];
}
if (_playResult) {
//NSLog(@"PLAY FINISHED DUE TO STOP");
_playResult(@{});
Expand Down
2 changes: 1 addition & 1 deletion just_audio/ios/Classes/AudioPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@property (readonly, nonatomic) float speed;

- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar playerId:(NSString*)idParam loadConfiguration:(NSDictionary *)loadConfiguration;
- (void)dispose:(BOOL) calledFromDealloc;
- (void)dispose:(BOOL)calledFromDealloc;

@end

Expand Down
2 changes: 1 addition & 1 deletion just_audio/macos/Classes/AudioPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@property (readonly, nonatomic) float speed;

- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar playerId:(NSString*)idParam loadConfiguration:(NSDictionary *)loadConfiguration;
- (void)dispose:(BOOL) calledFromDealloc;
- (void)dispose:(BOOL)calledFromDealloc;

@end

Expand Down
2 changes: 1 addition & 1 deletion just_audio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: just_audio
description: A feature-rich audio player for Flutter. Loop, clip and concatenate any sound from any source (asset/file/URL/stream) in a variety of audio formats with gapless playback.
version: 0.9.41
version: 0.9.42
repository: https://github.com/ryanheise/just_audio/tree/minor/just_audio
issue_tracker: https://github.com/ryanheise/just_audio/issues
topics:
Expand Down

0 comments on commit 4322bf7

Please sign in to comment.