package audio

/**
 * Class used for storing audio file information.
 */
class AudioFileInfo {
    var fileName : String = ""
    var fileSize : Long = 0L
    var duration : Double = 0.0
    var bytes : ByteArray = ByteArray(0)

    /**
     * Check if the audio file information is valid.
     * A valid audio file must have a non-blank file name, a positive file size,
     * a positive duration, and non-empty byte array.
     * @return True if the audio file information is valid, false otherwise.
     */
    fun isValid() : Boolean {
        return fileName.isNotBlank() && fileSize > 0 && duration > 0.0 && bytes.isNotEmpty()
    }
}