1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00
Arduino/hardware/arduino/sam/libraries/Audio/Audio.h
2012-06-17 18:20:01 +02:00

25 lines
448 B
C++

#ifndef AUDIO_H
#define AUDIO_H
#include "Arduino.h"
//#include <inttypes.h>
#include "Print.h"
class AudioClass : public Print {
public:
AudioClass(Dacc *_dac, uint32_t _dacId) : dac(_dac), dacId(_dacId) { };
void begin(uint32_t sampleRate);
void end();
virtual size_t write(uint8_t c) { write(&c, 1); };
virtual size_t write(const uint8_t *buffer, size_t size);
private:
Dacc *dac;
uint32_t dacId;
};
extern AudioClass Audio;
#endif