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

Dependencies:   mbed ExtTextLCD

mbed_dtmf_generator.hpp

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

File content as of revision 0:1324e7d9d471:

#ifndef _MBED_DTMF_GENERATOR_HPP
#define _MBED_DTMF_GENERATOR_HPP

#include "dtmf_generator.hpp"

#include "snd_wave_generator/SoundWaveGenerator.h"
#include "snd_wave_generator/Wave.h"

#include <memory>

class MbedDtmfGenerator : public DtmfGenerator {
public:
    MbedDtmfGenerator();
    
    virtual void play(char ch);
    virtual void stop();
    
private:
    void makeWaves();
    void makeKeyWave(int pos, int row, int col);
    snd_wave_generator::Wave * getWaveFor(char ch);
    
    snd_wave_generator::SoundWaveGenerator generator;
    std::auto_ptr<snd_wave_generator::Wave> rowWaves[4];
    std::auto_ptr<snd_wave_generator::Wave> colWaves[4];
    std::auto_ptr<snd_wave_generator::Wave> waves[16];
};

#endif