Fix file type error

Additionally changed compiler optimisation back to O3 and temporarily
use only a single buffer with flac decoding.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
Mahyar Koshkouei
2016-12-26 13:49:58 +00:00
parent ee1f4bfe20
commit 517f2e605b
3 changed files with 17 additions and 10 deletions

View File

@@ -134,6 +134,9 @@ int main(int argc, char **argv)
if(closedir(dp) != 0)
err_print("Closing directory failed.");
/* TODO: There is an issue with Unicode files here.
* Playing a flac file then a file with a name containing the
* character 'é' will cause the asprint to not work properly. */
if(asprintf(&file, "%s%s", AUDIO_FOLDER, ep->d_name) == -1)
{
err_print("Constructing file name failed.");
@@ -183,9 +186,10 @@ int getFileType(const char *file)
int fileSig = 0;
enum file_types file_type = FILE_TYPE_ERROR;
if(file == NULL)
if(ftest == NULL)
{
err_print("Opening file failed.");
printf("file: %s\n", file);
return -1;
}