Commit 38815300 authored by yanmorin's avatar yanmorin
Browse files

Using const* pointer for SpeexMode (API 1.1) and dividing the tone sound by two

parent 7ea7ad4c
...@@ -39,7 +39,7 @@ private: ...@@ -39,7 +39,7 @@ private:
void initSpeex(); void initSpeex();
void terminateSpeex(); void terminateSpeex();
SpeexMode* _speexModePtr; const SpeexMode* _speexModePtr;
SpeexBits _speex_dec_bits; SpeexBits _speex_dec_bits;
SpeexBits _speex_enc_bits; SpeexBits _speex_enc_bits;
void *_speex_dec_state; void *_speex_dec_state;
......
...@@ -117,7 +117,7 @@ Tone::genSin(int16 *buffer, int frequency1, int frequency2, int nb) ...@@ -117,7 +117,7 @@ Tone::genSin(int16 *buffer, int frequency1, int frequency2, int nb)
double var2 = (double)2 * (double)M_PI * (double)frequency2 / (double)_sampleRate; double var2 = (double)2 * (double)M_PI * (double)frequency2 / (double)_sampleRate;
// softer // softer
double amp = (double)(INT16_AMPLITUDE >> 3); double amp = (double)(INT16_AMPLITUDE >> 4);
if (_nbChannel == 2) { // stereo if (_nbChannel == 2) { // stereo
int k = 0; int k = 0;
for(int t = 0; t < nb; t++) { for(int t = 0; t < nb; t++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment