Syntax
void playFile(
    StorageEnum drv, 
    char * songName
);
ContentsIndex
PreviousUpNext
LAudioClass::playFile Method (StorageEnum, char *)
LAudioClass Class | Example
Syntax
void playFile(
    StorageEnum drv, 
    char * songName
);
Description

Plays an audio file from an SD card or the flash storage.

Parameters
Parameters 
Description 
StorageEnum drv 
[IN] The storage type, it can be storageSD (SD card) or storageFlash (flash storage). 
char * songName 
[IN] The path of the audio file in ASCII (char*) encoding. 
Example
    #include <LAudio.h>  
    void setup()
    {
        LAudio.begin();
        LAudio.playFile(storageFlash, (char*)"sample.mp3");
        LAudio.setVolume(2);
        delay(2000);
        LAudio.pause();
        delay(2000);
        LAudio.resume();
        delay(2000);
        LAudio.stop();
    }   
File

LAudio.h

Class