diff options
author | waker <wakeroid@gmail.com> | 2009-08-08 09:48:10 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-08 09:48:10 +0200 |
commit | 9c28c865dcb60da85587f9ae8ac7099d4737e3f6 (patch) | |
tree | bd102c1c649fa592f166c17ae3adb59fc4a4a498 /cvorbis.c | |
parent | cc33421f0796e7e0dbe215b4002f604bc3fea92d (diff) |
added duration precalc and filetype for ogg vorbis
Diffstat (limited to 'cvorbis.c')
-rw-r--r-- | cvorbis.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -37,7 +37,6 @@ cvorbis_init (const char *fname, int track, float start, float end) { //cvorbis.info.dataSize = ov_pcm_total (&vorbis_file, -1) * vi->channels * 2; cvorbis.info.channels = vi->channels; cvorbis.info.samplesPerSecond = vi->rate; - cvorbis.info.duration = ov_seekable (&vorbis_file) ? ov_time_total (&vorbis_file, -1) : -1; cvorbis.info.position = 0; // printf ("vorbis info: bps: %d, size: %d, chan: %d, rate: %d, dur: %f\n", cvorbis.info.bitsPerSample, cvorbis.info.dataSize, cvorbis.info.channels, cvorbis.info.samplesPerSecond, cvorbis.info.duration); return 0; @@ -137,6 +136,8 @@ cvorbis_insert (playItem_t *after, const char *fname) { } } } + it->filetype = "OggVorbis"; + it->duration = ov_seekable (&vorbis_file) ? ov_time_total (&vorbis_file, -1) : -1; if (!title_added) { ps_add_meta (it, "title", NULL); } |