瀏覽代碼

Fix compiler warnings

dds
PaulStoffregen 10 年之前
父節點
當前提交
3c31127761
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. +1
    -1
      Audio.cpp
  2. +3
    -3
      Audio.h

+ 1
- 1
Audio.cpp 查看文件

@@ -3142,7 +3142,7 @@ bool AudioControlSGTL5000::volumeInteger(unsigned int n)

bool AudioControlSGTL5000::volume(float left, float right)
{
unsigned short m=(0x7F-calcVol(right,0x7F))<<8|0x7F-calcVol(left,0x7F);
unsigned short m=((0x7F-calcVol(right,0x7F))<<8)|(0x7F-calcVol(left,0x7F));
return write(CHIP_ANA_HP_CTRL, m);
}


+ 3
- 3
Audio.h 查看文件

@@ -42,8 +42,8 @@ class AudioAnalyzeFFT256 : public AudioStream
{
public:
AudioAnalyzeFFT256(uint8_t navg = 8, const int16_t *win = AudioWindowHanning256)
: AudioStream(1, inputQueueArray), outputflag(false),
prevblock(NULL), count(0), naverage(navg), window(win) { init(); }
: AudioStream(1, inputQueueArray), window(win),
prevblock(NULL), count(0), naverage(navg), outputflag(false) { init(); }

bool available() {
if (outputflag == true) {
@@ -73,7 +73,7 @@ class AudioSynthWaveform : public AudioStream
public:
AudioSynthWaveform(const int16_t *waveform)
: AudioStream(0, NULL), wavetable(waveform), magnitude(0), phase(0)
, ramp_up(0), ramp_down(0), ramp_mag(0), ramp_length(0)
, ramp_down(0), ramp_up(0), ramp_mag(0), ramp_length(0)
{ }
void frequency(float freq) {
if (freq > AUDIO_SAMPLE_RATE_EXACT / 2 || freq < 0.0) return;

Loading…
取消
儲存