return -E_AUDIO_FORMAT;
}
+int get_audio_file_info(const char *path, char *data, size_t size,
+ struct audio_format_info *afhi)
+{
+ int ret, i, format = guess_audio_format(path);
+ if (format >= 0) {
+ ret = afl[format].get_file_info(data, size, afhi);
+ if (ret >= 0)
+ return ret;
+ }
+ FOR_EACH_AUDIO_FORMAT(i) {
+ if (i == format) /* we already tried this one to no avail */
+ continue;
+ ret = afl[i].get_file_info(data, size, afhi);
+ if (ret >= 0)
+ return ret;
+ }
+ return -E_AUDIO_FORMAT;
+
+}
+
/*
* upddate shared mem
*/
char *vss_get_header(size_t *header_len);
struct timeval *vss_chunk_time(void);
int guess_audio_format(const char *name);
+int get_audio_file_info(const char *path, char *data, size_t size,
+ struct audio_format_info *afhi);
const char *supported_audio_formats(void);
int vss_get_chunk(long unsigned chunk_num, char **buf, size_t *len);