- if (fstat(fileno(params->input_fp), &stb) == 0
- && (stb.st_mode & S_IFMT) != S_IFREG) {
- wav_io.seek = 0;
- wav_io.tell = 0;
- }
+ io.cookie = params->input_fp;
+ if (fstat(fileno(io.cookie), &stb) == 0
+ && (stb.st_mode & S_IFMT) == S_IFREG)
+ io.vtbl = &pcm_io_vtbl;
+ else
+ io.vtbl = &pcm_io_vtbl_noseek;
+