@@ -143,10 +143,10 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
143143 }
144144
145145 // / Defines the number of bytes used by the copier
146- virtual void setBufferSize (int size) { copier.resize (size); }
146+ void setBufferSize (int size) { copier.resize (size); }
147147
148148 // / (Re)Starts the playing of the music (from the beginning or the indicated index)
149- virtual bool begin (int index = 0 , bool isActive = true ) {
149+ bool begin (int index = 0 , bool isActive = true ) {
150150 TRACED ();
151151 bool result = false ;
152152 // initilaize volume
@@ -191,7 +191,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
191191 return result;
192192 }
193193
194- virtual void end () {
194+ void end () {
195195 TRACED ();
196196 active = false ;
197197 out_decoding.end ();
@@ -223,7 +223,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
223223 }
224224
225225 // / Updates the audio info in the related objects
226- virtual void setAudioInfo (AudioInfo info) override {
226+ void setAudioInfo (AudioInfo info) override {
227227 TRACED ();
228228 LOGI (" sample_rate: %d" , (int ) info.sample_rate );
229229 LOGI (" bits_per_sample: %d" , (int ) info.bits_per_sample );
@@ -241,23 +241,23 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
241241 p_final_notify->setAudioInfo (info);
242242 };
243243
244- virtual AudioInfo audioInfo () override { return info; }
244+ AudioInfo audioInfo () override { return info; }
245245
246246 // / starts / resumes the playing after calling stop(): same as setActive(true)
247- virtual void play () {
247+ void play () {
248248 TRACED ();
249249 setActive (true );
250250 }
251251
252252 // / halts the playing: same as setActive(false)
253- virtual void stop () {
253+ void stop () {
254254 TRACED ();
255255 setActive (false );
256256 }
257257
258258 // / moves to next file or nth next file when indicating an offset. Negative
259259 // / values are supported to move back.
260- virtual bool next (int offset = 1 ) {
260+ bool next (int offset = 1 ) {
261261 TRACED ();
262262 writeEnd ();
263263 stream_increment = offset >= 0 ? 1 : -1 ;
@@ -266,7 +266,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
266266 }
267267
268268 // / moves to the selected file position
269- virtual bool setIndex (int idx) {
269+ bool setIndex (int idx) {
270270 TRACED ();
271271 writeEnd ();
272272 stream_increment = 1 ;
@@ -275,7 +275,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
275275 }
276276
277277 // / Moves to the selected file w/o updating the actual file position
278- virtual bool setPath (const char *path) {
278+ bool setPath (const char *path) {
279279 TRACED ();
280280 writeEnd ();
281281 stream_increment = 1 ;
@@ -284,7 +284,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
284284 }
285285
286286 // / moves to previous file
287- virtual bool previous (int offset = 1 ) {
287+ bool previous (int offset = 1 ) {
288288 TRACED ();
289289 writeEnd ();
290290 stream_increment = -1 ;
@@ -293,7 +293,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
293293 }
294294
295295 // / start selected input stream
296- virtual bool setStream (Stream *input) {
296+ bool setStream (Stream *input) {
297297 end ();
298298 out_decoding.begin ();
299299 p_input_stream = input;
@@ -306,16 +306,16 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
306306 }
307307
308308 // / Provides the actual stream (=e.g.file)
309- virtual Stream *getStream () { return p_input_stream; }
309+ Stream *getStream () { return p_input_stream; }
310310
311311 // / determines if the player is active
312- virtual bool isActive () { return active; }
312+ bool isActive () { return active; }
313313
314314 // / determines if the player is active
315315 operator bool () { return isActive (); }
316316
317317 // / The same like start() / stop()
318- virtual void setActive (bool isActive) {
318+ void setActive (bool isActive) {
319319 if (is_auto_fade) {
320320 if (isActive) {
321321 fade.setFadeInActive (true );
@@ -350,18 +350,18 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
350350 // / Set automatically move to next file and end of current file: This is
351351 // / determined from the AudioSource. If you want to override it call this
352352 // / method after calling begin()!
353- virtual void setAutoNext (bool next) { autonext = next; }
353+ void setAutoNext (bool next) { autonext = next; }
354354
355355 // / Defines the wait time in ms if the target output is full
356- virtual void setDelayIfOutputFull (int delayMs) { delay_if_full = delayMs; }
356+ void setDelayIfOutputFull (int delayMs) { delay_if_full = delayMs; }
357357
358358 // / Copies DEFAULT_BUFFER_SIZE (=1024 bytes) from the source to the decoder: Call this method in the loop.
359- virtual size_t copy () {
359+ size_t copy () {
360360 return copy (copier.bufferSize ());
361361 }
362362
363363 // / Copies the indicated number of bytes from the source to the decoder: Call this method in the loop.
364- virtual size_t copy (size_t bytes) {
364+ size_t copy (size_t bytes) {
365365 size_t result = 0 ;
366366 if (active) {
367367 TRACED ();
@@ -397,7 +397,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
397397 }
398398
399399 // / Defines the medatadata callback
400- virtual void setMetadataCallback (void (*callback)(MetaDataType type,
400+ void setMetadataCallback (void (*callback)(MetaDataType type,
401401 const char *str, int len),
402402 ID3TypeSelection sel = SELECT_ID3) {
403403 TRACEI ();
@@ -415,7 +415,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
415415 }
416416
417417 // / Change the VolumeControl implementation
418- virtual void setVolumeControl (VolumeControl &vc) {
418+ void setVolumeControl (VolumeControl &vc) {
419419 volume_out.setVolumeControl (vc);
420420 }
421421
@@ -490,7 +490,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
490490 }
491491 }
492492
493- virtual void moveToNextFileOnTimeout () {
493+ void moveToNextFileOnTimeout () {
494494 if (!autonext)
495495 return ;
496496 if (p_final_stream != nullptr && p_final_stream->availableForWrite () == 0 )
0 commit comments