Skip to content

Commit ba7cc34

Browse files
add audio chapter
1 parent 56f7925 commit ba7cc34

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

AUDIO.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Audio module
2+
3+
4+
Audio module provides tools for read and play audio data. ASIO and multichannel supports enable low latency streaming to audio devices.
5+
6+
Example:
7+
8+
```
9+
info = audiodevinfo()
10+
OUTPUT_DEVICE = 0;
11+
INPUT_DEVICE = 1;
12+
for k = [1:audiodevinfo(OUTPUT_DEVICE)]
13+
info.output(k)
14+
end
15+
for k = [1:audiodevinfo(INPUT_DEVICE)]
16+
info.output(k)
17+
end
18+
```
19+
20+
```
21+
wav_audio = [modulepath('audio'), '/examples/haha.wav'];
22+
[y, fs] = audioread(wav_audio);
23+
playObj = audioplayer(y, fs);
24+
playblocking(playObj)
25+
delete(playObj)
26+
clear playObj
27+
```
28+
29+
30+
[Previous page](README.md)

FEATURES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
## [JavaScript Object Notation](JSON.md)
2828

2929

30+
## [Audio module](AUDIO.md)
31+
32+
3033
## [Code editor](CODE_EDITOR.md)
3134

3235

0 commit comments

Comments
 (0)