-
Notifications
You must be signed in to change notification settings - Fork 8
AudioBufferSourceNode
pieisland edited this page Dec 13, 2020
·
1 revision
- AudioBuffer์ ์ ์ฅ๋ ๋ฉ๋ชจ๋ฆฌ ๋ด ์ค๋์ค ๋ฐ์ดํฐ๋ก ๊ตฌ์ฑ๋ ์ค๋์ค ์์ค๋ฅผ ๋ํ๋ด๋ AudioScheduledSourceNode.
- start() ํธ์ถ ํ ํ ๋ฒ๋ง ์คํ๋ ์ ์๋ค. ๊ทธ๋์ ๋์ผํ ์์์ ํ ๋ฒ ๋ ์ฌ์ํ๊ณ ์ถ๋ค๋ฉด ์๋ก์ด node๋ฅผ ๋ง๋ค์ด์ผ ํ๋ค.
- stop()์ ํธ์ถํด ์ค์งํ ์ ์๋ค.
- ์คํ๋ audio asset์ธ AudioBuffer.
- AudioBuffer์ ๋์ ๋๋ฌํ์ ๋ ๋ค์ ์ฌ์๋ ๊ฒ์ธ์ง๋ฅผ ๊ฒฐ์ ํ๋ boolean ๊ฐ.
- ๊ธฐ๋ณธ ๊ฐ์ false.
- loop ๊ฐ์ด true์ผ ๋ AudioBuffer๊ฐ ์ธ์ ์คํ๋ ์ง๋ฅผ ๊ฒฐ์ ํ๋ ์ด๋จ์ floating point ๊ฐ.
- ๊ธฐ๋ณธ ๊ฐ์ 0.
- loop ๊ฐ์ด true์ผ ๋ AudioBuffer ์ฌ์์ด ์ค์ง๋๊ณ loopStart์ ํ์๋ ์๊ฐ์ผ๋ก ๋ค์ ๋ฃจํ๋๋ ์๊ฐ์ ๋ํ๋ด๋ floating point ๊ฐ.
- ๊ธฐ๋ณธ ๊ฐ์ 0.
- AudioBufferSourceNode์ ๋ถ๋ชจ.
- ์ฌ๋ฌ audio source node interface๋ค์ ํน์ ์๊ฐ์ start, stop ํ ์ ์๋๋ก ํด์ค๋ค.
- parameter๋ก when, offset, duration์ด ์๋ค. ๋ชจ๋ ์ ํ์ ์ธ ๊ฐ์ด๋ค.
- when: ์ด๋จ์ ์๊ฐ์ผ๋ก ์ผ๋ง๋ ๊ธฐ๋ค๋ ธ๋ค๊ฐ ์์ํ ๊ฒ์ธ์ง๋ฅผ ์๋ฏธํ๋ค. 0์ด๋ฉด ๋ฐ๋ก ์์ํ๋ฉฐ, ์ผ๋ง ํ์ ์์ํ๋๋ก ์ ํ๊ณ ์ถ๋ค๋ฉด AudioContext.currentTime + ์ํ๋ ์๊ฐ ์ด ๋ฅผ ํด์ฃผ์ด์ผ ํ๋ค.
- offset: ์ด๋จ์ ์๊ฐ์ผ๋ก audio buffer์ ์ด๋์์ ์์ํ ๊ฒ์ธ์ง๋ฅผ ์๋ฏธํ๋ค.
- duration: ์ด๋จ์ ์๊ฐ์ผ๋ก ์ผ๋ง ๋์ ์ฌ์๋ ๊ฒ์ธ์ง๋ฅผ ์๋ฏธํ๋ค.
- parameter๋ก when์ด ์๋ค. ์ ํ์ ์ธ ๊ฐ์ด๋ค.
- when: ์ด๋จ์ ์๊ฐ์ผ๋ก ์ผ๋ง๋ ๊ธฐ๋ค๋ ธ๋ค๊ฐ ๋ฉ์ถ ๊ฒ์ธ์ง๋ฅผ ์๋ฏธํ๋ค.
๐ Week1 Meeting Log
๐ Week2 Meeting Log
๐ Week3 Meeting Log
๐ Week4 Meeting Log
๐ Week5 Meeting Log
๐ References
- Official Docs
- Blogs