Skip to content

Commit c6bef8c

Browse files
committed
Minor cleanups
1 parent c5101d2 commit c6bef8c

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

packages/audioplayers/tizen/src/audio_player.cc

+11-13
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,21 @@ AudioPlayer::AudioPlayer(const std::string &player_id, bool low_latency,
1616
StartPlayingListener start_playing_listener,
1717
SeekCompletedListener seek_completed_listener,
1818
PlayCompletedListener play_completed_listener,
19-
ErrorListener error_listener) {
20-
player_id_ = player_id;
21-
low_latency_ = low_latency;
22-
prepared_listener_ = prepared_listener;
23-
start_playing_listener_ = start_playing_listener;
24-
seek_completed_listener_ = seek_completed_listener;
25-
play_completed_listener_ = play_completed_listener;
26-
error_listener_ = error_listener;
27-
}
19+
ErrorListener error_listener)
20+
: player_id_(player_id),
21+
low_latency_(low_latency),
22+
prepared_listener_(prepared_listener),
23+
start_playing_listener_(start_playing_listener),
24+
seek_completed_listener_(seek_completed_listener),
25+
play_completed_listener_(play_completed_listener),
26+
error_listener_(error_listener) {}
2827

2928
AudioPlayer::~AudioPlayer() { Release(); }
3029

3130
void AudioPlayer::Play() {
3231
player_state_e state = GetPlayerState();
3332
if (state == PLAYER_STATE_IDLE && preparing_) {
34-
// player is preparing, play will be called in prepared callback.;
33+
// Player is preparing, play will be called in prepared callback.
3534
should_play_ = true;
3635
return;
3736
}
@@ -63,7 +62,7 @@ void AudioPlayer::Play() {
6362
EmitPositionUpdates();
6463
break;
6564
default:
66-
// "player is already playing audio.
65+
// Player is already playing audio.
6766
break;
6867
}
6968
}
@@ -122,7 +121,7 @@ void AudioPlayer::Seek(int position) {
122121
throw AudioPlayerError(error, "player_set_play_position failed");
123122
}
124123
} else {
125-
// player is unprepared, do seek in prepared callback.
124+
// Player is unprepared, do seek in prepared callback.
126125
should_seek_to_ = position;
127126
}
128127
}
@@ -233,7 +232,6 @@ void AudioPlayer::PreparePlayer() {
233232
ret = player_set_looping(player_, (release_mode_ == ReleaseMode::kLoop));
234233
HandleResult("player_set_looping", ret);
235234

236-
LOG_DEBUG("prepare audio player asynchronously");
237235
ret = player_prepare_async(player_, OnPrepared, (void *)this);
238236
HandleResult("player_prepare_async", ret);
239237
preparing_ = true;

packages/audioplayers/tizen/src/audio_player.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef AUDIO_PLAYER_H_
2-
#define AUDIO_PLAYER_H_
1+
#ifndef FLUTTER_PLUGIN_AUDIO_PLAYER_H_
2+
#define FLUTTER_PLUGIN_AUDIO_PLAYER_H_
33

44
#include <Ecore.h>
55
#include <player.h>
@@ -84,4 +84,4 @@ class AudioPlayer {
8484
ErrorListener error_listener_;
8585
};
8686

87-
#endif // AUDIO_PLAYER_H_
87+
#endif // FLUTTER_PLUGIN_AUDIO_PLAYER_H_

packages/audioplayers/tizen/src/audio_player_error.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef AUDIO_PLAYER_ERROR_H_
2-
#define AUDIO_PLAYER_ERROR_H_
1+
#ifndef FLUTTER_PLUGIN_AUDIO_PLAYER_ERROR_H_
2+
#define FLUTTER_PLUGIN_AUDIO_PLAYER_ERROR_H_
33

44
#include <string>
55

@@ -27,4 +27,4 @@ class AudioPlayerError {
2727
std::string message_;
2828
};
2929

30-
#endif // AUDIO_PLAYER_ERROR_H_
30+
#endif // FLUTTER_PLUGIN_AUDIO_PLAYER_ERROR_H_

0 commit comments

Comments
 (0)