changeset 664:52b8efa55fcf trunk

[svn] - wav-sndfile engine: correctly compute the bitrate
author nenolod
date Sat, 17 Feb 2007 19:58:29 -0800
parents aaab0bede198
children 86570de2f4e6
files ChangeLog src/wav/wav-sndfile.c
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Feb 17 07:46:52 2007 -0800
+++ b/ChangeLog	Sat Feb 17 19:58:29 2007 -0800
@@ -1,3 +1,10 @@
+2007-02-17 15:46:52 +0000  Tony Vroon <chainsaw@gentoo.org>
+  revision [1412]
+  Cast those pointers properly, and do not use deprecated GTK+ functions.
+  trunk/src/projectm/main.c |    4 ++--
+  1 file changed, 2 insertions(+), 2 deletions(-)
+
+
 2007-02-17 09:41:14 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1410]
   - remove a bunch of audacious-core cruft
--- a/src/wav/wav-sndfile.c	Sat Feb 17 07:46:52 2007 -0800
+++ b/src/wav/wav-sndfile.c	Sat Feb 17 19:58:29 2007 -0800
@@ -108,7 +108,8 @@
 
 static int
 is_our_file (char *filename)
-{	SNDFILE	*tmp_sndfile;
+{
+	SNDFILE	*tmp_sndfile;
 	SF_INFO tmp_sfinfo;
 
 	/* Have to open the file to see if libsndfile can handle it. */
@@ -124,7 +125,8 @@
 
 static void*
 play_loop (void *arg)
-{	static short buffer [BUFFER_SIZE];
+{
+	static short buffer [BUFFER_SIZE];
 	int samples;
 	InputPlayback *playback = arg;
 
@@ -177,7 +179,7 @@
 	if (! (sndfile = sf_open (filename, SFM_READ, &sfinfo)))
 		return;
 
-	bit_rate = sfinfo.samplerate * pcmbitwidth * sfinfo.channels;
+	bit_rate = sfinfo.samplerate * pcmbitwidth;
 
 	if (sfinfo.samplerate > 0)
 		song_length = (int) ceil (1000.0 * sfinfo.frames / sfinfo.samplerate);