convert soft tabs to hard tabs and add a modeline
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* audio_file_mp3.h - Audio-device which encodes mp3-stream and writes it
|
||||
* into an mp3-file. This is used for song-export.
|
||||
* into an mp3-file. This is used for song-export.
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* 2009 Andrew Kelley <superjoe30@gmail.com>
|
||||
* 2009 Andrew Kelley <superjoe30@gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -69,9 +69,9 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
short int rescale(float sample); // convert float flame to short int frame
|
||||
short int rescale(float sample); // convert float flame to short int frame
|
||||
|
||||
// overloaded functions
|
||||
// overloaded functions
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
float _master_gain );
|
||||
@@ -80,15 +80,16 @@ private:
|
||||
void finishEncoding( void );
|
||||
|
||||
|
||||
// handle to lame
|
||||
lame_global_flags *m_lgf;
|
||||
LameLibrary m_lame;
|
||||
// handle to lame
|
||||
lame_global_flags *m_lgf;
|
||||
LameLibrary m_lame;
|
||||
|
||||
QFile * m_outfile;
|
||||
bool m_hq_mode; // true if we want really high quality
|
||||
QFile * m_outfile;
|
||||
bool m_hq_mode; // true if we want really high quality
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* vim: set tw=0 noexpandtab: */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* lame_library.h - Manages loading and unloading of lame library dynamically
|
||||
*
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* 2009 Andrew Kelley <superjoe30@gmail.com>
|
||||
* 2009 Andrew Kelley <superjoe30@gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -34,113 +34,115 @@
|
||||
#include "config_mgr.h"
|
||||
|
||||
class LameLibrary {
|
||||
private:
|
||||
// functions we'll be importing from lame
|
||||
typedef lame_global_flags *lame_init_t(void);
|
||||
typedef int lame_init_params_t(lame_global_flags*);
|
||||
typedef const char* get_lame_version_t(void);
|
||||
private:
|
||||
// functions we'll be importing from lame
|
||||
typedef lame_global_flags *lame_init_t(void);
|
||||
typedef int lame_init_params_t(lame_global_flags*);
|
||||
typedef const char* get_lame_version_t(void);
|
||||
|
||||
typedef int lame_encode_buffer_t (
|
||||
lame_global_flags* gf,
|
||||
const short int buffer_l [],
|
||||
const short int buffer_r [],
|
||||
const int nsamples,
|
||||
unsigned char * mp3buf,
|
||||
const int mp3buf_size );
|
||||
typedef int lame_encode_buffer_t (
|
||||
lame_global_flags* gf,
|
||||
const short int buffer_l [],
|
||||
const short int buffer_r [],
|
||||
const int nsamples,
|
||||
unsigned char * mp3buf,
|
||||
const int mp3buf_size );
|
||||
|
||||
typedef int lame_encode_buffer_interleaved_t(
|
||||
lame_global_flags* gf,
|
||||
short int pcm[],
|
||||
int num_samples, /* per channel */
|
||||
unsigned char* mp3buf,
|
||||
int mp3buf_size );
|
||||
typedef int lame_encode_buffer_interleaved_t(
|
||||
lame_global_flags* gf,
|
||||
short int pcm[],
|
||||
int num_samples, /* per channel */
|
||||
unsigned char* mp3buf,
|
||||
int mp3buf_size );
|
||||
|
||||
typedef int lame_encode_flush_t(
|
||||
lame_global_flags *gf,
|
||||
unsigned char* mp3buf,
|
||||
int size );
|
||||
typedef int lame_encode_flush_t(
|
||||
lame_global_flags *gf,
|
||||
unsigned char* mp3buf,
|
||||
int size );
|
||||
|
||||
typedef int lame_close_t(lame_global_flags*);
|
||||
typedef int lame_close_t(lame_global_flags*);
|
||||
|
||||
typedef int lame_set_in_samplerate_t(lame_global_flags*, int);
|
||||
typedef int lame_set_out_samplerate_t(lame_global_flags*, int);
|
||||
typedef int lame_set_num_channels_t(lame_global_flags*, int );
|
||||
typedef int lame_set_quality_t(lame_global_flags*, int);
|
||||
typedef int lame_set_brate_t(lame_global_flags*, int);
|
||||
typedef int lame_set_VBR_t(lame_global_flags *, vbr_mode);
|
||||
typedef int lame_set_VBR_q_t(lame_global_flags *, int);
|
||||
typedef int lame_set_VBR_min_bitrate_kbps_t(lame_global_flags *, int);
|
||||
typedef int lame_set_mode_t(lame_global_flags *, MPEG_mode);
|
||||
typedef int lame_set_preset_t(lame_global_flags *, int);
|
||||
typedef int lame_set_error_protection_t(lame_global_flags *, int);
|
||||
typedef int lame_set_disable_reservoir_t(lame_global_flags *, int);
|
||||
typedef int lame_set_padding_type_t(lame_global_flags *, Padding_type);
|
||||
typedef int lame_set_bWriteVbrTag_t(lame_global_flags *, int);
|
||||
typedef size_t lame_get_lametag_frame_t(const lame_global_flags *, unsigned char* buffer, size_t size);
|
||||
typedef void lame_mp3_tags_fid_t(lame_global_flags *, FILE *);
|
||||
typedef int lame_set_in_samplerate_t(lame_global_flags*, int);
|
||||
typedef int lame_set_out_samplerate_t(lame_global_flags*, int);
|
||||
typedef int lame_set_num_channels_t(lame_global_flags*, int );
|
||||
typedef int lame_set_quality_t(lame_global_flags*, int);
|
||||
typedef int lame_set_brate_t(lame_global_flags*, int);
|
||||
typedef int lame_set_VBR_t(lame_global_flags *, vbr_mode);
|
||||
typedef int lame_set_VBR_q_t(lame_global_flags *, int);
|
||||
typedef int lame_set_VBR_min_bitrate_kbps_t(lame_global_flags *, int);
|
||||
typedef int lame_set_mode_t(lame_global_flags *, MPEG_mode);
|
||||
typedef int lame_set_preset_t(lame_global_flags *, int);
|
||||
typedef int lame_set_error_protection_t(lame_global_flags *, int);
|
||||
typedef int lame_set_disable_reservoir_t(lame_global_flags *, int);
|
||||
typedef int lame_set_padding_type_t(lame_global_flags *, Padding_type);
|
||||
typedef int lame_set_bWriteVbrTag_t(lame_global_flags *, int);
|
||||
typedef size_t lame_get_lametag_frame_t(const lame_global_flags *, unsigned char* buffer, size_t size);
|
||||
typedef void lame_mp3_tags_fid_t(lame_global_flags *, FILE *);
|
||||
|
||||
typedef int lame_set_findReplayGain_t(lame_global_flags *, int);
|
||||
typedef int lame_set_VBR_quality_t(lame_global_flags *, float);
|
||||
typedef int lame_set_VBR_mean_bitrate_kbps_t(lame_global_flags *, int);
|
||||
typedef int lame_set_VBR_max_bitrate_kbps_t(lame_global_flags *, int);
|
||||
typedef int lame_set_findReplayGain_t(lame_global_flags *, int);
|
||||
typedef int lame_set_VBR_quality_t(lame_global_flags *, float);
|
||||
typedef int lame_set_VBR_mean_bitrate_kbps_t(lame_global_flags *, int);
|
||||
typedef int lame_set_VBR_max_bitrate_kbps_t(lame_global_flags *, int);
|
||||
|
||||
typedef int lame_decode_init_t(void);
|
||||
typedef int lame_decode1_headers_t(unsigned char *, int, short *,
|
||||
short *, mp3data_struct *);
|
||||
typedef int lame_decode_headers_t(unsigned char *, int, short *,
|
||||
short *, mp3data_struct *);
|
||||
typedef int lame_decode_t(unsigned char *, int, short *, short *);
|
||||
typedef int lame_decode_exit_t(void);
|
||||
typedef int lame_decode_init_t(void);
|
||||
typedef int lame_decode1_headers_t(unsigned char *, int, short *,
|
||||
short *, mp3data_struct *);
|
||||
typedef int lame_decode_headers_t(unsigned char *, int, short *,
|
||||
short *, mp3data_struct *);
|
||||
typedef int lame_decode_t(unsigned char *, int, short *, short *);
|
||||
typedef int lame_decode_exit_t(void);
|
||||
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
LameLibrary(); // loads lame library
|
||||
~LameLibrary(); // unloads lame library
|
||||
LameLibrary(); // loads lame library
|
||||
~LameLibrary(); // unloads lame library
|
||||
|
||||
|
||||
bool isLoaded(); // returns whether or not lame is correctly attached
|
||||
bool isLoaded(); // returns whether or not lame is correctly attached
|
||||
|
||||
/* function pointers to the symbols we get from the library */
|
||||
lame_init_t* lame_init;
|
||||
lame_init_params_t* lame_init_params;
|
||||
lame_encode_buffer_t* lame_encode_buffer;
|
||||
lame_encode_buffer_interleaved_t* lame_encode_buffer_interleaved;
|
||||
lame_encode_flush_t* lame_encode_flush;
|
||||
lame_close_t* lame_close;
|
||||
get_lame_version_t* get_lame_version;
|
||||
/* function pointers to the symbols we get from the library */
|
||||
lame_init_t* lame_init;
|
||||
lame_init_params_t* lame_init_params;
|
||||
lame_encode_buffer_t* lame_encode_buffer;
|
||||
lame_encode_buffer_interleaved_t* lame_encode_buffer_interleaved;
|
||||
lame_encode_flush_t* lame_encode_flush;
|
||||
lame_close_t* lame_close;
|
||||
get_lame_version_t* get_lame_version;
|
||||
|
||||
lame_set_in_samplerate_t* lame_set_in_samplerate;
|
||||
lame_set_out_samplerate_t* lame_set_out_samplerate;
|
||||
lame_set_num_channels_t* lame_set_num_channels;
|
||||
lame_set_quality_t* lame_set_quality;
|
||||
lame_set_brate_t* lame_set_brate;
|
||||
lame_set_VBR_t* lame_set_VBR;
|
||||
lame_set_VBR_q_t* lame_set_VBR_q;
|
||||
lame_set_VBR_min_bitrate_kbps_t* lame_set_VBR_min_bitrate_kbps;
|
||||
lame_set_mode_t* lame_set_mode;
|
||||
lame_set_preset_t* lame_set_preset;
|
||||
lame_set_error_protection_t* lame_set_error_protection;
|
||||
lame_set_disable_reservoir_t *lame_set_disable_reservoir;
|
||||
lame_set_padding_type_t *lame_set_padding_type;
|
||||
lame_set_bWriteVbrTag_t *lame_set_bWriteVbrTag;
|
||||
lame_get_lametag_frame_t *lame_get_lametag_frame;
|
||||
lame_mp3_tags_fid_t *lame_mp3_tags_fid;
|
||||
lame_set_findReplayGain_t *lame_set_findReplayGain;
|
||||
lame_set_VBR_quality_t *lame_set_VBR_quality;
|
||||
lame_set_VBR_mean_bitrate_kbps_t *lame_set_VBR_mean_bitrate_kbps;
|
||||
lame_set_VBR_max_bitrate_kbps_t *lame_set_VBR_max_bitrate_kbps;
|
||||
lame_set_in_samplerate_t* lame_set_in_samplerate;
|
||||
lame_set_out_samplerate_t* lame_set_out_samplerate;
|
||||
lame_set_num_channels_t* lame_set_num_channels;
|
||||
lame_set_quality_t* lame_set_quality;
|
||||
lame_set_brate_t* lame_set_brate;
|
||||
lame_set_VBR_t* lame_set_VBR;
|
||||
lame_set_VBR_q_t* lame_set_VBR_q;
|
||||
lame_set_VBR_min_bitrate_kbps_t* lame_set_VBR_min_bitrate_kbps;
|
||||
lame_set_mode_t* lame_set_mode;
|
||||
lame_set_preset_t* lame_set_preset;
|
||||
lame_set_error_protection_t* lame_set_error_protection;
|
||||
lame_set_disable_reservoir_t *lame_set_disable_reservoir;
|
||||
lame_set_padding_type_t *lame_set_padding_type;
|
||||
lame_set_bWriteVbrTag_t *lame_set_bWriteVbrTag;
|
||||
lame_get_lametag_frame_t *lame_get_lametag_frame;
|
||||
lame_mp3_tags_fid_t *lame_mp3_tags_fid;
|
||||
lame_set_findReplayGain_t *lame_set_findReplayGain;
|
||||
lame_set_VBR_quality_t *lame_set_VBR_quality;
|
||||
lame_set_VBR_mean_bitrate_kbps_t *lame_set_VBR_mean_bitrate_kbps;
|
||||
lame_set_VBR_max_bitrate_kbps_t *lame_set_VBR_max_bitrate_kbps;
|
||||
|
||||
lame_decode_init_t *lame_decode_init;
|
||||
lame_decode1_headers_t *lame_decode1_headers;
|
||||
lame_decode_headers_t *lame_decode_headers;
|
||||
lame_decode_t *lame_decode;
|
||||
lame_decode_exit_t *lame_decode_exit;
|
||||
lame_decode_init_t *lame_decode_init;
|
||||
lame_decode1_headers_t *lame_decode1_headers;
|
||||
lame_decode_headers_t *lame_decode_headers;
|
||||
lame_decode_t *lame_decode;
|
||||
lame_decode_exit_t *lame_decode_exit;
|
||||
|
||||
private:
|
||||
QLibrary * m_lameLib; // lame .so file
|
||||
private:
|
||||
QLibrary * m_lameLib; // lame .so file
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* vim: set tw=0 expandtab: */
|
||||
|
||||
@@ -222,8 +222,8 @@ private:
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _sample_rate );
|
||||
|
||||
f_cnt_t decodeSampleMp3( QString & file, int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels, sample_rate_t & _samplerate );
|
||||
f_cnt_t decodeSampleMp3( QString & file, int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels, sample_rate_t & _samplerate );
|
||||
|
||||
QString m_audioFile;
|
||||
sampleFrame * m_origData;
|
||||
@@ -253,3 +253,5 @@ signals:
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* vim: set tw=0 expandtab: */
|
||||
|
||||
Reference in New Issue
Block a user