summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2005-12-24 00:08:42 +0000
committerMike Melanson <mike@multimedia.cx>2005-12-24 00:08:42 +0000
commit29d9efb1c818c2e54e8b51da004bf47183bb4944 (patch)
tree2b318d929f0c7d1a4225cae9aef7164fe1a99571 /src/demuxers
parentbbe0503beb3bf41c4335fb325ac705f2be086923 (diff)
downloadxine-lib-29d9efb1c818c2e54e8b51da004bf47183bb4944.tar.gz
xine-lib-29d9efb1c818c2e54e8b51da004bf47183bb4944.tar.bz2
finally figured out the correct frequency formula
CVS patchset: 7827 CVS date: 2005/12/24 00:08:42
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_voc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/demuxers/demux_voc.c b/src/demuxers/demux_voc.c
index 441d8acaa..cfd67a9e6 100644
--- a/src/demuxers/demux_voc.c
+++ b/src/demuxers/demux_voc.c
@@ -25,7 +25,7 @@
* It will only play that block if it is PCM data. More variations will be
* supported as they are encountered.
*
- * $Id: demux_voc.c,v 1.39 2004/06/13 21:28:54 miguelfreitas Exp $
+ * $Id: demux_voc.c,v 1.40 2005/12/24 00:08:42 tmmm Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -81,7 +81,7 @@ static int open_voc_file(demux_voc_t *this) {
unsigned char header[VOC_HEADER_SIZE];
unsigned char preamble[BLOCK_PREAMBLE_SIZE];
off_t first_block_offset;
- signed char sample_rate_divisor;
+ unsigned char sample_rate_divisor;
if (_x_demux_read_header(this->input, header, VOC_HEADER_SIZE) != VOC_HEADER_SIZE)
return 0;
@@ -124,7 +124,7 @@ static int open_voc_file(demux_voc_t *this) {
this->audio_type = BUF_AUDIO_LPCM_BE;
sample_rate_divisor = preamble[0];
- this->audio_sample_rate = 256 - (1000000 / sample_rate_divisor);
+ this->audio_sample_rate = 1000000 / (256 - sample_rate_divisor);
this->data_start = this->input->get_current_pos(this->input);
this->audio_bits = 8;
this->audio_channels = 1;