-
Notifications
You must be signed in to change notification settings - Fork 86
rtaudio start
Walt K edited this page Jan 23, 2021
·
4 revisions
This function starts the real-time audio subsystem. C-side real-time hooks must first be registered with the rtaudio_register
function, see example below. The flag is passed to the initialization hook, and volume is used to initialize the sound output volume.
Parameter | Description |
---|---|
samplerate | Integer sampling rate (e.g. 8000 Hz) On Android, only 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 192000, are valid |
volume | normalized output volume (0.0-1.0) |
Real-time audio example (straight echo of input to output):
(c-declare #<<end-of-c-declare
void rtaudio_register(void (*)(int), void (*)(float), void (*)(float*,float*),void (*)(void));
float buffer;
void my_realtime_init(int flag) { buffer=0; }
void my_realtime_input(float v) { buffer=v; }
void my_realtime_output(float *v1,float *v2) { *v1=*v2=buffer; }
void my_realtime_close() { buffer=0; }
end-of-c-declare
)
..
(c-initialize "rtaudio_register(my_realtime_init,my_realtime_input,my_realtime_output,my_realtime_close);")
..
(rtaudio-start 8000 1.0)
..
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip