@@ -143,10 +143,10 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
143
143
}
144
144
145
145
// / 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); }
147
147
148
148
// / (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 ) {
150
150
TRACED ();
151
151
bool result = false ;
152
152
// initilaize volume
@@ -191,7 +191,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
191
191
return result;
192
192
}
193
193
194
- virtual void end () {
194
+ void end () {
195
195
TRACED ();
196
196
active = false ;
197
197
out_decoding.end ();
@@ -223,7 +223,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
223
223
}
224
224
225
225
// / Updates the audio info in the related objects
226
- virtual void setAudioInfo (AudioInfo info) override {
226
+ void setAudioInfo (AudioInfo info) override {
227
227
TRACED ();
228
228
LOGI (" sample_rate: %d" , (int ) info.sample_rate );
229
229
LOGI (" bits_per_sample: %d" , (int ) info.bits_per_sample );
@@ -241,23 +241,23 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
241
241
p_final_notify->setAudioInfo (info);
242
242
};
243
243
244
- virtual AudioInfo audioInfo () override { return info; }
244
+ AudioInfo audioInfo () override { return info; }
245
245
246
246
// / starts / resumes the playing after calling stop(): same as setActive(true)
247
- virtual void play () {
247
+ void play () {
248
248
TRACED ();
249
249
setActive (true );
250
250
}
251
251
252
252
// / halts the playing: same as setActive(false)
253
- virtual void stop () {
253
+ void stop () {
254
254
TRACED ();
255
255
setActive (false );
256
256
}
257
257
258
258
// / moves to next file or nth next file when indicating an offset. Negative
259
259
// / values are supported to move back.
260
- virtual bool next (int offset = 1 ) {
260
+ bool next (int offset = 1 ) {
261
261
TRACED ();
262
262
writeEnd ();
263
263
stream_increment = offset >= 0 ? 1 : -1 ;
@@ -266,7 +266,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
266
266
}
267
267
268
268
// / moves to the selected file position
269
- virtual bool setIndex (int idx) {
269
+ bool setIndex (int idx) {
270
270
TRACED ();
271
271
writeEnd ();
272
272
stream_increment = 1 ;
@@ -275,7 +275,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
275
275
}
276
276
277
277
// / 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) {
279
279
TRACED ();
280
280
writeEnd ();
281
281
stream_increment = 1 ;
@@ -284,7 +284,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
284
284
}
285
285
286
286
// / moves to previous file
287
- virtual bool previous (int offset = 1 ) {
287
+ bool previous (int offset = 1 ) {
288
288
TRACED ();
289
289
writeEnd ();
290
290
stream_increment = -1 ;
@@ -293,7 +293,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
293
293
}
294
294
295
295
// / start selected input stream
296
- virtual bool setStream (Stream *input) {
296
+ bool setStream (Stream *input) {
297
297
end ();
298
298
out_decoding.begin ();
299
299
p_input_stream = input;
@@ -306,16 +306,16 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
306
306
}
307
307
308
308
// / Provides the actual stream (=e.g.file)
309
- virtual Stream *getStream () { return p_input_stream; }
309
+ Stream *getStream () { return p_input_stream; }
310
310
311
311
// / determines if the player is active
312
- virtual bool isActive () { return active; }
312
+ bool isActive () { return active; }
313
313
314
314
// / determines if the player is active
315
315
operator bool () { return isActive (); }
316
316
317
317
// / The same like start() / stop()
318
- virtual void setActive (bool isActive) {
318
+ void setActive (bool isActive) {
319
319
if (is_auto_fade) {
320
320
if (isActive) {
321
321
fade.setFadeInActive (true );
@@ -350,18 +350,18 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
350
350
// / Set automatically move to next file and end of current file: This is
351
351
// / determined from the AudioSource. If you want to override it call this
352
352
// / method after calling begin()!
353
- virtual void setAutoNext (bool next) { autonext = next; }
353
+ void setAutoNext (bool next) { autonext = next; }
354
354
355
355
// / 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; }
357
357
358
358
// / 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 () {
360
360
return copy (copier.bufferSize ());
361
361
}
362
362
363
363
// / 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) {
365
365
size_t result = 0 ;
366
366
if (active) {
367
367
TRACED ();
@@ -397,7 +397,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
397
397
}
398
398
399
399
// / Defines the medatadata callback
400
- virtual void setMetadataCallback (void (*callback)(MetaDataType type,
400
+ void setMetadataCallback (void (*callback)(MetaDataType type,
401
401
const char *str, int len),
402
402
ID3TypeSelection sel = SELECT_ID3) {
403
403
TRACEI ();
@@ -415,7 +415,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
415
415
}
416
416
417
417
// / Change the VolumeControl implementation
418
- virtual void setVolumeControl (VolumeControl &vc) {
418
+ void setVolumeControl (VolumeControl &vc) {
419
419
volume_out.setVolumeControl (vc);
420
420
}
421
421
@@ -490,7 +490,7 @@ class AudioPlayer : public AudioInfoSupport, public VolumeSupport {
490
490
}
491
491
}
492
492
493
- virtual void moveToNextFileOnTimeout () {
493
+ void moveToNextFileOnTimeout () {
494
494
if (!autonext)
495
495
return ;
496
496
if (p_final_stream != nullptr && p_final_stream->availableForWrite () == 0 )
0 commit comments