diff options
author | waker <wakeroid@gmail.com> | 2012-10-09 19:52:41 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-10-09 19:52:41 +0200 |
commit | c55f92966ea08512570fa7e381ffecad16cc2486 (patch) | |
tree | 48baacbf6327672006150f026c25fa1b81f1766e /plugins/vorbis | |
parent | 0b7dbebd8acf3091196a3e375b91a8e517df14f1 (diff) |
vorbis: update waveformat if changes dynamically in the stream
Diffstat (limited to 'plugins/vorbis')
-rw-r--r-- | plugins/vorbis/vorbis.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index a121695a..6036d215 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -316,6 +316,9 @@ cvorbis_read (DB_fileinfo_t *_info, char *bytes, int size) { ogg_info_t *info = (ogg_info_t *)_info; // trace ("cvorbis_read %d bytes\n", size); + _info->fmt.channels = info->vi->channels; + _info->fmt.samplerate = info->vi->rate; + int samplesize = _info->fmt.channels * _info->fmt.bps / 8; if (!info->info.file->vfs->is_streaming ()) { |