Commit Graph

205 Commits

Author SHA1 Message Date
Hajime Hoshi
25665f5035 audio: No need for loop in audio_openal; alSource's state might be al.Initial 2016-04-06 03:31:06 +09:00
Hajime Hoshi
1ded7dc6b8 audio: Refactoring 2016-04-06 01:26:21 +09:00
Hajime Hoshi
3cedae882f audio: Bug fix: buffers must be consumed (reproduced on go-inovation) 2016-04-06 01:17:11 +09:00
Hajime Hoshi
398d7710ae audio: Stream reading must be done only when buffers are available (Windows) 2016-04-05 12:17:23 +09:00
Hajime Hoshi
2d3c3e361e audio: Replace 'for' with 'if' as preparation to avoid goroutine 2016-04-05 03:31:37 +09:00
Hajime Hoshi
ff8f15a212 audio: Refactoring 2016-04-05 02:56:25 +09:00
Hajime Hoshi
7bdda4e9ca audio: Refactoring: Remove context.sampleRate 2016-04-05 02:40:14 +09:00
Hajime Hoshi
805e6b7b36 audio: Use Read-write lock 2016-04-05 02:24:54 +09:00
Hajime Hoshi
79985535c3 audio: Refactoring: mixingStream has the global lock 2016-04-05 02:17:39 +09:00
Hajime Hoshi
da6ffdf2b9 audio: Refactoring: context doesn't have to have a reference to stream 2016-04-05 00:40:31 +09:00
Hajime Hoshi
f222885d97 audio: Context.Update now returns error (#197) 2016-04-05 00:09:00 +09:00
Hajime Hoshi
b6a02ddc94 audio: Refactoring: Unify loop 2016-04-04 23:42:44 +09:00
Hajime Hoshi
cc51bc2a08 audio: Sleep 1 msec instead of calling Gosched in JavaScript 2016-04-04 02:54:54 +09:00
Hajime Hoshi
0b040e92e8 audio: Bug fix: compilation error on JavaScript 2016-04-04 02:53:07 +09:00
Hajime Hoshi
ab793d9c8b audio: Reduce panic on Windows 2016-04-04 02:50:00 +09:00
Hajime Hoshi
68cf7bf6fa audio: Refactoring: Add player.proceed on Windows 2016-04-04 02:42:37 +09:00
Hajime Hoshi
11141cc52a audio: Refactoring: Remove *player.start in JS 2016-04-04 02:23:15 +09:00
Hajime Hoshi
26bc94ca4a audio: Reduce panic 2016-04-04 02:16:26 +09:00
Hajime Hoshi
3d8de3254c audio: Reduce panic 2016-04-03 16:13:00 +09:00
Hajime Hoshi
8d6ed85145 audio: Bug fix: old API in JavaScript 2016-04-03 06:36:04 +09:00
Hajime Hoshi
8dc3c2fb70 audio: Refactoring: Remove player.start 2016-04-03 03:15:57 +09:00
Hajime Hoshi
911de8d196 audio: Refactoring: Remove Loop.pos 2016-04-03 03:08:45 +09:00
Hajime Hoshi
1ec786f83a audio: audio.NewContext now returns error 2016-04-03 02:59:44 +09:00
Hajime Hoshi
e631714a43 audio: SetVolume now rejects NaN 2016-04-03 02:46:18 +09:00
Hajime Hoshi
54f0e30fe6 audio: Remove returning value from startPlaying 2016-04-03 02:43:39 +09:00
Hajime Hoshi
4492c0dad0 audio/vorbis: Refactoring: Use uintptr to calc a pointer value with an offset 2016-04-03 01:14:39 +09:00
Hajime Hoshi
2475fd32a8 audio/vorbis: Bug fix: Converting uchar into uint8 doesn't work on Cgo on Linux 2016-04-02 23:22:44 +09:00
Hajime Hoshi
34e084cbce audio: Add Loop 2016-04-02 23:03:39 +09:00
Hajime Hoshi
03906148bb audio/vorbis: Stop copying streaming in JavaScript 2016-04-02 22:23:29 +09:00
Hajime Hoshi
764c755dd0 audio/vorbis: Avoid copying by using C.short values directly 2016-04-02 21:56:21 +09:00
Hajime Hoshi
d5ac3f831d audio/vorbis: decode should accept io.ReadCloser 2016-04-02 20:09:35 +09:00
Hajime Hoshi
f73b679fe6 audio/vorbis: Simplify to use stb_vorbis_decode_memory 2016-04-02 20:08:32 +09:00
Hajime Hoshi
5c7d36e62e audio/vorbis: Refactoring 2016-03-31 22:47:16 +09:00
Hajime Hoshi
07bc077f5b audio/vorbis: Bug fix: decode.go shouldn't be compiled for JS 2016-03-31 03:48:07 +09:00
Hajime Hoshi
ba2df59c3a audio/vorbis: Copy Go file from go-vorbis 2016-03-31 02:59:08 +09:00
Hajime Hoshi
38d10e31db audio/vorbis: Rename files 2016-03-31 02:34:31 +09:00
Hajime Hoshi
4dba239cb5 audio/vorbis: Accept ReadSeekCloser instead of Reader 2016-03-30 03:15:31 +09:00
Hajime Hoshi
e0a058bcc3 audio/wav: Parse header more accurately 2016-03-30 03:03:08 +09:00
Hajime Hoshi
4e50588c0c audio/wav: Bug fix: add header size to offset only when whence is 0 2016-03-30 02:54:25 +09:00
Hajime Hoshi
aba404d39f audio/wav: Parse header more accurately 2016-03-30 01:30:40 +09:00
Hajime Hoshi
992832afe1 audio/voribs: Bug fix: sampleRate member doesn't exist 2016-03-29 23:50:17 +09:00
Hajime Hoshi
56f4968e70 audio: Add TODOs 2016-03-29 03:34:46 +09:00
Hajime Hoshi
4d7045c161 audio: Remove Stream.Len and add Stream.Size 2016-03-29 03:20:10 +09:00
Hajime Hoshi
d2ccbdbe23 audio: Add Player.Close (#194) 2016-03-29 00:06:37 +09:00
Hajime Hoshi
0662e1a1de audio: Add Volume/SetVolume 2016-03-28 11:06:17 +09:00
Hajime Hoshi
27911b8156 Add audio/wav package 2016-03-27 19:10:16 +09:00
Hajime Hoshi
f8e984a62a audio/vorbis: Fix error messages 2016-03-27 16:31:28 +09:00
Hajime Hoshi
3b35e6c253 audio/vorbis: Remove Stream interface 2016-03-27 01:15:28 +09:00
Hajime Hoshi
82788c45b0 audio/vorbis: Enable to decode parallelly in JavaScript 2016-03-20 04:33:59 +09:00
Hajime Hoshi
3acb3e08ce audio/vorbis: Bug fix: Set sample rate in JavaScript 2016-03-20 04:12:02 +09:00
Hajime Hoshi
4a4621a126 examples/audio: Implement seeking 2016-03-20 01:40:10 +09:00
Hajime Hoshi
eb0d650612 tmp 2016-03-18 02:42:47 +09:00
Hajime Hoshi
79e1d1b1f7 audio/vorbis: Add Stream interface 2016-03-18 02:42:47 +09:00
Hajime Hoshi
6c78837d06 test: Split util_test into readfile_test and readfile_js_test 2016-03-17 00:11:40 +09:00
Hajime Hoshi
c100ff7989 audio: Refactoring 2016-03-16 03:02:54 +09:00
Hajime Hoshi
3bf9334a80 audio: Bug fix: a buffer size passed to OpenAL must be a multiple of 4 (#187) 2016-03-16 02:58:33 +09:00
Hajime Hoshi
1bb8a8b4bf audio: time.Sleep for Windows 2016-03-14 01:13:11 +09:00
Hajime Hoshi
d397842ada audio: More sleeping (#183) 2016-03-14 01:03:52 +09:00
Hajime Hoshi
681b8ef933 audio: time.Sleep to avoid busy loop 2016-03-14 00:07:31 +09:00
Hajime Hoshi
f07702746c audio: Reduce 'make' for performance (#183) 2016-03-13 23:13:50 +09:00
Hajime Hoshi
8b8eb855a7 audio: Avoid busy loops (#183) 2016-03-13 22:39:03 +09:00
Hajime Hoshi
b1f856a0e0 Add FPS const 2016-03-13 04:57:31 +09:00
Hajime Hoshi
305016f636 audio: Reduce magic numbers 2016-03-13 03:59:57 +09:00
Hajime Hoshi
8c065a28e1 audio/vorbis: Hide Stream struct 2016-03-13 03:15:19 +09:00
Hajime Hoshi
bc49108c40 audio: Move VorbisStream to a new package 2016-03-13 03:00:05 +09:00
Hajime Hoshi
71312ba26f audio: Add AudioContext.Update (#177) 2016-03-12 23:40:11 +09:00
Hajime Hoshi
77b62615b2 audio: Adjust buffer size to reduce noise 2016-03-11 13:03:45 +09:00
Hajime Hoshi
f2173f8f75 audio: Bug fix: Adjust stream position (#180) 2016-03-11 12:01:48 +09:00
Hajime Hoshi
bcd7bfc74e audio: Bug fix: mixedPlayersStream.Read must return 0 when nothing plays (#180) 2016-03-11 04:21:27 +09:00
Hajime Hoshi
b1568e19cb audio: Bug fix: Remove noise by calling 'stop' (#149) 2016-03-11 02:27:34 +09:00
Hajime Hoshi
1313644611 audio: Refactoring: Remove unneeded for loop 2016-03-11 02:10:07 +09:00
Hajime Hoshi
7aaa599f6b audio: Change position from float64 to int64 2016-03-11 01:51:13 +09:00
Hajime Hoshi
76a2dbad26 audio: Fix compile error on Windows 2016-03-10 03:32:52 +09:00
Hajime Hoshi
3cbcda1bb0 audio: Use runtime.Gosched() instead of time.Sleep(1) 2016-03-10 03:27:51 +09:00
Hajime Hoshi
252fee56d3 audio: Rename OggStream -> VorbisStream 2016-03-09 01:36:19 +09:00
Hajime Hoshi
b964df4f0f Add examples/audio and OggStream struct 2016-03-08 04:36:06 +09:00
Hajime Hoshi
59c2fcd961 audio: Remove print 2016-03-08 02:47:04 +09:00
Hajime Hoshi
66052b5b5d audio: an inner player should be in the context 2016-03-08 02:30:38 +09:00
Hajime Hoshi
d632a2d7a4 audio: Refactoring 2016-03-06 22:03:11 +09:00
Hajime Hoshi
5ba5a1fb90 audio: Add player methods 2016-03-06 18:55:20 +09:00
Hajime Hoshi
38e36dedc1 audio: Remove padding 0 values 2016-03-06 18:25:58 +09:00
Hajime Hoshi
c090805021 audio: Make sure to fill 4096 bytes 2016-03-06 03:48:47 +09:00
Hajime Hoshi
e69b44e327 audio: Refactoring 2016-03-05 23:01:13 +09:00
Hajime Hoshi
8631fbc027 audio: mixedPlayingStream returns empty 0s again 2016-03-05 22:58:54 +09:00
Hajime Hoshi
d33bb06f1d audio: Audio now works on browsers (#175) 2016-03-05 21:09:17 +09:00
Hajime Hoshi
6d85d82c85 audio: mixedPlayerStream.Read now may return 0 byte result 2016-03-05 20:09:29 +09:00
Hajime Hoshi
976d61816c audio: context is in a member of player 2016-03-05 19:35:30 +09:00
Hajime Hoshi
fb5a366b97 audio: Refactoring 2016-03-05 18:31:30 +09:00
Hajime Hoshi
b21c6627c9 audio: Implement audio for Windows 2016-03-05 05:34:13 +09:00
Hajime Hoshi
cb481f6fb9 audio: Windows: Dummy impl 2016-03-05 02:25:51 +09:00
Hajime Hoshi
af4aef9921 audio: Prepare implementation for Windows 2016-03-05 02:16:43 +09:00
Hajime Hoshi
6f562f1b0a audio: Refactoring: Remove initialize 2016-03-05 02:02:19 +09:00
Hajime Hoshi
76386213bd audio: Refactoring 2016-03-05 01:52:28 +09:00
Hajime Hoshi
136c09cd33 audio: Rename Stop -> Pause 2016-03-05 01:01:57 +09:00
Hajime Hoshi
9c097c73f5 audio: Refactoring: Remove newPlayerFromCache 2016-03-05 00:57:35 +09:00
Hajime Hoshi
05f52b5e57 audio: Filter overflow values 2016-03-03 12:22:10 +09:00
Hajime Hoshi
3859bc7421 audio: Mixing by Go 2016-03-03 11:57:25 +09:00
Hajime Hoshi
58c5e5e655 audio: Add Context 2016-03-03 00:48:59 +09:00
Hajime Hoshi
22f16f0c23 audio: Add comment 2016-02-15 10:41:02 +09:00
Hajime Hoshi
5dbdb23b46 audio: Inifite stream in JS 2016-02-13 22:36:08 +09:00