Skip to content

File limit of 99 on SD cards #59

Description

@Kevinlzh9802

Sometimes the midge stops recording in the middle, although not frequently.

fileCount = 0;
while (true)
{
if (audio_switch_get_position()==HIGH) sprintf(filename, "%dMicHi%d", drv_audio_get_mode(), fileCount);
if (audio_switch_get_position()==LOW) sprintf(filename, "%dMicLo%d", drv_audio_get_mode(), fileCount);
ff_result = f_stat(filename, &fno); // Check if the file already exists
if (ff_result == FR_NO_FILE)
{
break; // File does not exist, break the loop
}
if (fileCount >= 99)
{
return -1; // Maximum file count reached
}
fileCount++;
}

I think there is an issue when the number of files reaches 99. As sometimes the file are split into multiple chunks this can be easily reached, and then it would not start recording microphone. Typically this happens way before the storage of 4GB/8GB is reached. I think it can be increased to 999, or removed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions