Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
WaveBuffer.cpp
00001 #include "snd_wave_generator/WaveBuffer.h" 00002 00003 namespace snd_wave_generator { 00004 00005 void WaveBuffer::resize(std::size_t size) 00006 { 00007 if (this->capacity_ > 0 && size > this->capacity_) { 00008 delete[] this->data_; 00009 this->data_ = NULL; 00010 this->capacity_ = 0; 00011 } 00012 00013 if (size > this->capacity_) { 00014 this->data_ = new float[size]; 00015 this->capacity_ = size; 00016 } 00017 00018 this->size_ = size; 00019 } 00020 00021 } // snd_wave_generator
Generated on Wed Jul 13 2022 16:23:43 by
1.7.2