Commit c3ed7e8e authored by Stefan Westerfeld's avatar Stefan Westerfeld

Allow creating altered wav data.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 29db2ef2
......@@ -13,6 +13,17 @@ bound (const T& min_value, const T& value, const T& max_value)
return std::min (std::max (value, min_value), max_value);
}
WavData::WavData()
{
}
WavData::WavData (const vector<float>& samples, int n_channels, float mix_freq, int bit_depth)
{
m_samples = samples;
m_n_channels = n_channels;
m_mix_freq = mix_freq;
m_bit_depth = bit_depth;
}
bool
WavData::load (const string& filename)
......
......@@ -13,6 +13,9 @@ class WavData
std::string m_error_blurb;
public:
WavData();
WavData (const std::vector<float>& samples, int n_channels, float mix_freq, int bit_depth);
bool load (const std::string& filename);
bool save (const std::string& filename);
......
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