diff options
author | 2009-07-06 20:44:39 +0200 | |
---|---|---|
committer | 2009-07-06 20:44:39 +0200 | |
commit | 2b583ad8d29236e88b34107d5e98c9889a95b4dc (patch) | |
tree | 11f618ceb0fdf9dc418350930011ceca7d2f7918 /cvorbis.c | |
parent | 70679eb6465814b368eb1ec91c6b450f324512b5 (diff) |
position tracking, statusbar, seekbar updating, some cleanup
Diffstat (limited to 'cvorbis.c')
-rw-r--r-- | cvorbis.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -25,10 +25,11 @@ int cvorbis_init (const char *fname) { ov_open (file, &vorbis_file, NULL, 0); vi = ov_info (&vorbis_file, -1); cvorbis.info.bitsPerSample = 16; - cvorbis.info.dataSize = ov_pcm_total (&vorbis_file, -1) * vi->channels * 2; + //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; } @@ -76,6 +77,7 @@ cvorbis_read (char *bytes, int size) break; } } + cvorbis.info.position = ov_time_tell(&vorbis_file); return 0; } |