added ArdVoice Library
This commit is contained in:
parent
959d112b90
commit
dca8e5ec03
8 changed files with 611 additions and 4 deletions
22
arduboy-rust/Wrapper-Project/src/library/ardvoice/ardvoice.h
Normal file
22
arduboy-rust/Wrapper-Project/src/library/ardvoice/ardvoice.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
#include <ArdVoice.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void ardvoice_play_voice(const char *audio)
|
||||
{
|
||||
ardvoice.playVoice(audio);
|
||||
}
|
||||
void ardvoice_play_voice_complex(const char *audio, uint16_t startTime, uint16_t endTime, float speed)
|
||||
{
|
||||
ardvoice.playVoice(audio, startTime, endTime, speed);
|
||||
}
|
||||
void ardvoice_stop_voice()
|
||||
{
|
||||
ardvoice.stopVoice();
|
||||
}
|
||||
bool ardvoice_is_voice_playing()
|
||||
{
|
||||
return ardvoice.isVoicePlaying();
|
||||
}
|
||||
}
|
|
@ -13,6 +13,11 @@ Arduboy2 arduboy;
|
|||
#include <ArduboyTones.h>
|
||||
#include "./library/arduboy/arduboy_tones_export.h"
|
||||
#endif
|
||||
#if defined(ArdVoice_Library)
|
||||
#include <ArdVoice.h>
|
||||
ArdVoice ardvoice;
|
||||
#include "./library/ardvoice/ardvoice.h"
|
||||
#endif
|
||||
|
||||
#if defined(Arduino_Library)
|
||||
#include "./library/arduino/arduino_export.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue