Permalink
Browse files

updating docs

  • Loading branch information...
1 parent ab29d82 commit 3a60fed67157fd2dee34ac20599a6e30185956f4 @tenderlove committed Sep 29, 2008
View
@@ -4,7 +4,9 @@ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "lib")
kind = Config::CONFIG["DLEXT"]
-Hoe.new('icanhasaudio', '0.1.1') do |p|
+require 'icanhasaudio/version'
+
+Hoe.new('icanhasaudio', Audio::MPEG::Decoder::VERSION) do |p|
p.rubyforge_name = 'seattlerb'
p.author = 'Aaron Patterson'
p.email = 'aaronp@rubyforge.org'
@@ -44,6 +44,12 @@ static VALUE method_lame_version(VALUE klass) {
return rb_str_new(version, strlen(version));
}
+/*
+ * call-seq:
+ * decode_headers_for(buffer)
+ *
+ * Decode the mp3 headers for +buffer+.
+ */
static VALUE decode_headers_for(VALUE self, VALUE rb_buffer)
{
int enc_delay;
@@ -1,5 +1,11 @@
#include <audio_mpeg_decoder_mp3data.h>
+/*
+ * call-seq:
+ * header_parsed?
+ *
+ * Has the mp3 header been parsed yet?
+ */
static VALUE header_parsed_eh(VALUE self)
{
mp3data_struct * mp3data;
@@ -9,27 +15,51 @@ static VALUE header_parsed_eh(VALUE self)
return Qfalse;
}
+/*
+ * call-seq:
+ * bitrate
+ *
+ * Get the bitrate
+ */
static VALUE bitrate(VALUE self)
{
mp3data_struct * mp3data;
Data_Get_Struct(self, mp3data_struct, mp3data);
return INT2NUM(mp3data->bitrate);
}
+/*
+ * call-seq:
+ * total_frames
+ *
+ * Get the total frames for this mp3
+ */
static VALUE total_frames(VALUE self)
{
mp3data_struct * mp3data;
Data_Get_Struct(self, mp3data_struct, mp3data);
return INT2NUM(mp3data->totalframes);
}
+/*
+ * call-seq:
+ * nsamp
+ *
+ * Get the number of samples
+ */
static VALUE get_nsamp(VALUE self)
{
mp3data_struct * mp3data;
Data_Get_Struct(self, mp3data_struct, mp3data);
return LONG2NUM(mp3data->nsamp);
}
+/*
+ * call-seq:
+ * nsamp=(num)
+ *
+ * Set the number of samples to +num+
+ */
static VALUE set_nsamp(VALUE self, VALUE num)
{
mp3data_struct * mp3data;
View
@@ -2,11 +2,3 @@
require 'icanhasaudio/mpeg'
require 'icanhasaudio/ogg'
require 'icanhasaudio/native'
-
-module Audio
- module MPEG
- class Decoder
- VERSION = '0.1.2'
- end
- end
-end
@@ -0,0 +1,8 @@
+module Audio
+ module MPEG
+ class Decoder
+ VERSION = '0.1.2'
+ end
+ end
+end
+

0 comments on commit 3a60fed

Please sign in to comment.