Navigation Menu

Skip to content

Commit

Permalink
cleaning up header files
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 27, 2008
1 parent 89420aa commit cddf486
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 28 deletions.
7 changes: 1 addition & 6 deletions ext/decoder.c
@@ -1,9 +1,4 @@
#include <ruby.h>
#include <lame/lame.h>
#include <assert.h>
#include <decoder.h>
#include <get_audio.h>
#include <rb_wav.h>
#include <icanhasaudio.h>

int
lame_decoder(VALUE self, VALUE infile, VALUE outf, mp3data_struct * mp3data)
Expand Down
4 changes: 4 additions & 0 deletions ext/decoder.h
@@ -1,3 +1,7 @@
#ifndef ICANHASAUDIO_LAME_DECODER_H
#define ICANHASAUDIO_LAME_DECODER_H

int
lame_decoder(VALUE self, VALUE infile, VALUE outf, mp3data_struct * mp3data);

#endif
5 changes: 1 addition & 4 deletions ext/get_audio.c
@@ -1,7 +1,4 @@
#include <ruby.h>
#include <assert.h>
#include <lame/lame.h>
#include "get_audio.h"
#include <icanhasaudio.h>

#define MAX_U_32_NUM 0xFFFFFFFF

Expand Down
6 changes: 1 addition & 5 deletions ext/icanhasaudio.c
Expand Up @@ -6,11 +6,7 @@
*
* Released under the GPL
*/
#include "icanhasaudio.h"
#include "syncword.h"
#include "decoder.h"
#include "mpeg_encoder.h"
#include "get_audio.h"
#include <icanhasaudio.h>

static VALUE rb_mAudio;
static VALUE rb_mMpeg;
Expand Down
9 changes: 9 additions & 0 deletions ext/icanhasaudio.h
Expand Up @@ -2,7 +2,16 @@
#define ICANHASAUDIO_H

#include <ruby.h>
#include <rubyio.h>
#include <lame/lame.h>
#include <dlfcn.h>
#include <assert.h>
#include <syncword.h>
#include <decoder.h>
#include <mpeg_encoder.h>
#include <get_audio.h>
#include <ogg/ogg.h>
#include <vorbis/vorbisfile.h>
#include <rb_wav.h>

#endif
3 changes: 1 addition & 2 deletions ext/mpeg_encoder.c
@@ -1,5 +1,4 @@
#include "mpeg_encoder.h"
#include <rubyio.h>
#include <icanhasaudio.h>

static VALUE cMpegEncoder;

Expand Down
3 changes: 0 additions & 3 deletions ext/mpeg_encoder.h
@@ -1,9 +1,6 @@
#ifndef MPEG_ENCODER_H
#define MPEG_ENCODER_H

#include "icanhasaudio.h"
#include "get_audio.h"

#define LAME_MAXMP3BUFFER 16384
void init_MpegEncoder(VALUE mMpeg);

Expand Down
5 changes: 1 addition & 4 deletions ext/rb_ogg.c
@@ -1,7 +1,4 @@
#include <ruby.h>
#include <ogg/ogg.h>
#include <vorbis/vorbisfile.h>
#include <rb_wav.h>
#include <icanhasaudio.h>

size_t rb_ogg_read(void *ptr, size_t size, size_t nmemb, void *datasource) {
VALUE file = (VALUE)datasource;
Expand Down
3 changes: 1 addition & 2 deletions ext/rb_wav.c
@@ -1,5 +1,4 @@
#include <ruby.h>
#include <rb_wav.h>
#include <icanhasaudio.h>

#define WRITE_U32(buf, x) *(buf) = (unsigned char)((x)&0xff);\
*((buf)+1) = (unsigned char)(((x)>>8)&0xff);\
Expand Down
3 changes: 1 addition & 2 deletions ext/rb_wav.h
@@ -1,5 +1,4 @@
#include <ogg/ogg.h>
#include <vorbis/vorbisfile.h>
#include <icanhasaudio.h>

void prelim_header( VALUE self,
char *headbuf,
Expand Down
2 changes: 2 additions & 0 deletions ext/syncword.c
@@ -1,3 +1,5 @@
#include <icanhasaudio.h>

/*
* Taken from lame, get_audio.c
*/
Expand Down
3 changes: 3 additions & 0 deletions ext/syncword.h
@@ -1,3 +1,6 @@
#ifndef ICANHASAUDIO_SYNCWORD
#define ICANHASAUDIO_SYNCWORD

int is_syncword_mp123(const void *const headerptr);

#endif

0 comments on commit cddf486

Please sign in to comment.