Permalink
Browse files

fixing some compiler warnings

  • Loading branch information...
tenderlove committed Sep 29, 2008
1 parent 8a0915d commit f09b033bb8e3b161837899acf014e52b467d895b
Showing with 7 additions and 4 deletions.
  1. +2 −1 History.txt
  2. +2 −0 Manifest.txt
  3. +3 −3 ext/icanhasaudio/audio_mpeg_decoder.c
View
@@ -1,7 +1,8 @@
-=== Unreleased
+=== 0.1.2
* Bugfix
* Determining bitrate by filesize if not determined yet.
+ * Moving lots of C code to Ruby!
=== 0.1.1
View
@@ -26,6 +26,8 @@ lib/icanhasaudio/mpeg.rb
lib/icanhasaudio/mpeg/decoder.rb
lib/icanhasaudio/mpeg/encoder.rb
lib/icanhasaudio/ogg.rb
+lib/icanhasaudio/wav.rb
+lib/icanhasaudio/wav/file.rb
test/assets/icha.mp3
test/assets/testcase.wav
test/helper.rb
@@ -68,6 +68,8 @@ static VALUE decode_headers_for(VALUE self, VALUE rb_buffer)
if(ret == -1)
rb_raise(rb_eRuntimeError, "Decode headers failed.\n");
+
+ return rb_mp3data;
}
/*
@@ -84,7 +86,6 @@ static VALUE native_decode(VALUE self, VALUE infile, VALUE outf) {
int i;
int tmp_num_channels;
int skip;
- char headbuf[44];
VALUE raw;
mp3data_struct * mp3data;
@@ -103,7 +104,7 @@ static VALUE native_decode(VALUE self, VALUE infile, VALUE outf) {
wavsize = -skip;
if(lame_get_num_samples(gfp) == MAX_U_32_NUM) {
- VALUE samples = rb_funcall(self, rb_intern("determine_samples_for"), 1, infile);
+ rb_funcall(self, rb_intern("determine_samples_for"), 1, infile);
}
mp3data->totalframes = mp3data->nsamp / mp3data->framesize;
@@ -112,7 +113,6 @@ static VALUE native_decode(VALUE self, VALUE infile, VALUE outf) {
do {
char BitBuffer16[1152 * 4];
int bit_16_i = 0;
- int total = 0;
iread = get_audio16(self, infile, Buffer, mp3data);
mp3data->framenum += iread / mp3data->framesize;
wavsize += iread;

0 comments on commit f09b033

Please sign in to comment.