-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding MP3 encoding using lame as an option
- Loading branch information
Showing
15 changed files
with
399 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* --------------------------------------------------------------------------- | ||
** This software is in the public domain, furnished "as is", without technical | ||
** support, and with no warranty, express or implied, as to its usefulness for | ||
** any purpose. | ||
** | ||
** AudioCompressor.h | ||
** | ||
** Contains abstract class for audio compressors | ||
** | ||
** -------------------------------------------------------------------------*/ | ||
|
||
#pragma once | ||
|
||
#include "logger.h" | ||
|
||
class AudioCompressor | ||
{ | ||
public: | ||
AudioCompressor(); | ||
virtual int compress(short* pcm_data, int sample_count, char* output_buffer, int output_buffer_size) { return -1; }; | ||
private: | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* --------------------------------------------------------------------------- | ||
** This software is in the public domain, furnished "as is", without technical | ||
** support, and with no warranty, express or implied, as to its usefulness for | ||
** any purpose. | ||
** | ||
** MP3AudioCompressor.h | ||
** | ||
** Contains abstract class for audio compressors | ||
** | ||
** -------------------------------------------------------------------------*/ | ||
|
||
#pragma once | ||
|
||
#include "logger.h" | ||
#include <lame.h> | ||
#include "AudioCompressor.h" | ||
|
||
class MP3AudioCompressor: public AudioCompressor | ||
{ | ||
public: | ||
MP3AudioCompressor(); | ||
MP3AudioCompressor(int channels, int samplerate); | ||
int compress(short* pcm_data, int sample_count, char* output_buffer, int output_buffer_size); | ||
private: | ||
lame_global_flags* gfp; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* --------------------------------------------------------------------------- | ||
** This software is in the public domain, furnished "as is", without technical | ||
** support, and with no warranty, express or implied, as to its usefulness for | ||
** any purpose. | ||
** -------------------------------------------------------------------------*/ | ||
|
||
#pragma once | ||
|
||
#include "logger.h" | ||
#include "AudioCompressor.h" | ||
|
||
class NullAudioCompressor: public AudioCompressor | ||
{ | ||
public: | ||
NullAudioCompressor(); | ||
int compress(short* pcm_data, int sample_count, char* output_buffer, int output_buffer_size); | ||
private: | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.