diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-03-13 07:45:52 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-03-13 07:45:52 +0100 |
commit | 0be89102741d33c75cfd90ce92ec344c1bcdd726 (patch) | |
tree | 6998143d593a59719d94758772a72c6ccc20b6c7 | |
parent | c923b6748da64fcdbd9cd47abbe56078800b3e99 (diff) | |
download | toolame-dab-0be89102741d33c75cfd90ce92ec344c1bcdd726.tar.gz toolame-dab-0be89102741d33c75cfd90ce92ec344c1bcdd726.tar.bz2 toolame-dab-0be89102741d33c75cfd90ce92ec344c1bcdd726.zip |
Add kludge for pipe input
-rw-r--r-- | audio_read.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio_read.c b/audio_read.c index aa97def..007f020 100644 --- a/audio_read.c +++ b/audio_read.c @@ -470,6 +470,13 @@ parse_input_file (FILE * musicin, char inPath[MAX_NAME_SIZE], frame_header *head return; } + if (fseek (musicin, 0L, SEEK_SET) == -1) { + fprintf (stderr, "Input is not seekable, assuming pipe with raw PCM\n"); + fprintf (stderr, "Remember to set samplerate with '-s'.\n"); + *num_samples = MAX_U_32_NUM; /* huge sound file */ + return; + } + /**************************** AIFF ********************************/ if ((soundPosition = aiff_read_headers (musicin, &pcm_aiff_data)) != -1) { fprintf (stderr, ">>> Using Audio IFF sound file headers\n"); |