A DTMF sequence editor and player for HAM radio equipment command & control.

Dependencies:   mbed ExtTextLCD

SoundWaveGenerator/WaveBuffer.cpp

Committer:
osmeest
Date:
2011-03-07
Revision:
0:1324e7d9d471

File content as of revision 0:1324e7d9d471:

#include "snd_wave_generator/WaveBuffer.h"

namespace snd_wave_generator {

void WaveBuffer::resize(std::size_t size)
{
    if (this->capacity_ > 0 && size > this->capacity_) {
        delete[] this->data_;
        this->data_ = NULL;
        this->capacity_ = 0;
    }
    
    if (size > this->capacity_) {
        this->data_ = new float[size];
        this->capacity_ = size;
    }
    
    this->size_ = size;
}

} // snd_wave_generator