Commit Graph

231 Commits

Author SHA1 Message Date
Hajime Hoshi
cdef7df61d audio: update comments
Updates #2160
2024-07-21 21:45:55 +09:00
Hajime Hoshi
a032a5d71c audio: update comments
Updates #2160
2024-07-21 21:42:19 +09:00
Hajime Hoshi
f0ef1ecad0 all: add float32 version of audio APIs
This change adds these APIs

 * (*audio.Context).NewPlayerF32
 * (*audio.Context).NewPlayerF32FromBytes
 * audio.NewInfiniteLoopF32
 * audio.NewInfiniteLoopWithIntroF32
 * audio.ResampleF32
 * mp3.DecodeF32
 * vorbis.DecodeF32
 * wav.DecodeF32

Closes #2160
2024-07-21 19:12:18 +09:00
Hajime Hoshi
52820e2b43 audio: reland: bug fix: crash with uncomparable source
Closes #3039
2024-07-15 14:18:18 +09:00
Hajime Hoshi
420a6c16de Revert "audio: bug fix: crash with uncomparable source"
This reverts commit e980d59191.

Reason: Compile error with Go 1.19
2024-07-15 13:52:50 +09:00
Hajime Hoshi
e980d59191 audio: bug fix: crash with uncomparable source
Closes #3039
2024-07-15 13:46:23 +09:00
Hajime Hoshi
b552266afe audio/internal/convert: enable to resample a float32 stream
Updates #2160
2024-07-14 17:51:24 +09:00
Hajime Hoshi
43f505b3a0 audio: use float32 format under the hood
Updates #2160
2024-07-13 21:46:39 +09:00
Hajime Hoshi
844a4de872 audio: remove const bytesPerSampleInt16
This is a preparation for float32 players.

Updates #2160
2024-07-06 23:57:05 +09:00
Hajime Hoshi
6bbfec1869 audio: refactoring: initialize the context at an update hook
Closes #2715
2024-03-16 22:42:04 +09:00
Hajime Hoshi
9cc017412f audio: refactoring 2024-03-16 21:44:39 +09:00
Hajime Hoshi
d10636d235 audio: bug fix: suspend and resume player's stopwatches
Updates #2901
2024-02-01 20:30:09 +09:00
Hajime Hoshi
6ced6987cd audio: make (*Player).Position() smoother
Closes #2901
2024-02-01 18:05:14 +09:00
Hajime Hoshi
b9f0db955c audio: refactoring 2024-02-01 15:27:24 +09:00
Hajime Hoshi
82f2319020 internal/hook: rename hooks -> hook 2023-10-06 13:58:00 +09:00
Hajime Hoshi
98ead195c6 audio: bug fix: deadlock between a player and a context
Closes #2737
2023-08-29 14:52:48 +09:00
Hajime Hoshi
fbea792fe4 audio: rename Seek -> SetPosition and Current -> Position
Seek and Current are not removed but marked as deprecated.

Closes #2698
2023-08-02 01:24:52 +09:00
Hajime Hoshi
335dab9175 audio: refactoring 2023-07-30 17:04:58 +09:00
Hajime Hoshi
9b05d9eb35 audio: refactoring 2023-07-30 14:42:13 +09:00
Hajime Hoshi
85f8423345 audio: rename constants
Updates #2630
2023-04-08 19:14:28 +09:00
Hajime Hoshi
6bce8fea2d audio: update comments 2023-01-09 18:53:19 +09:00
Terra Brown
a1cc44833d
add errcheck static analysis (#2293)
Closes #2287
2022-09-10 01:52:46 +09:00
Hajime Hoshi
b53c686017 audio: bug fix: suspend/resume didn't return an error
This was removed at a93897d9d2 accidentally.

Updates #1665
2022-08-31 12:12:06 +09:00
mattn
3cd0daac67
go generate ./... with Go 1.19 (#2228) 2022-08-03 20:48:02 +09:00
Hajime Hoshi
20082b3879 audio: add more explanations to Resample 2022-07-23 18:35:53 +09:00
Vseslav Kochenov
00b530bfcc
audio: add Resample (#2212)
Closes #2055
2022-07-23 18:32:22 +09:00
Hajime Hoshi
017ad69e93 audio: add comments 2022-07-23 18:17:05 +09:00
Hajime Hoshi
921aeb4ea7 audio: rename channelNum -> channelCount 2022-07-13 02:08:38 +09:00
Hajime Hoshi
7a33837ed7 audio: change the type of SetBufferSize to time.Duration
Updates #2026
2022-03-25 20:47:01 +09:00
Hajime Hoshi
0e8c423e51 Revert "audio: add (*Player).UnplayedBufferSize (#2021)"
This reverts commit 7744013b05.

Reason: This is no longer needed and SetBufferSize is enough.

Updates #2020
Updates #2026
2022-03-25 20:28:32 +09:00
Hajime Hoshi
08783542eb audio: add Player.SetBufferSize
This change also adds examples/realtimepcm.

Closes #2026
2022-03-25 19:27:25 +09:00
Hajime Hoshi
7744013b05
audio: add (*Player).UnplayedBufferSize (#2021)
Closes #2020
2022-03-22 16:55:56 +09:00
Hajime Hoshi
eaaa601261 audio: refactoring: rename types 2021-12-17 16:02:12 +09:00
Hajime Hoshi
d9967c53e5 audio: Treat Oto context's error 2021-10-22 15:29:00 +09:00
Hajime Hoshi
fb1ab5e779 audio: Refactoring 2021-08-21 20:10:12 +09:00
Hajime Hoshi
a93897d9d2 audio: Remove Oto (v0) usages
Closes #1665
2021-08-21 19:29:32 +09:00
Hajime Hoshi
92bc5c1908 audio: Add (*Context).NewPlayer and (*Context).NewPlayerFromBytes
Closes #1708
2021-07-22 16:41:04 +09:00
Hajime Hoshi
4b7064ac58 audio: Bug fix: Do not create players every call of IsReady
Close #1709
2021-07-10 19:21:32 +09:00
Hajime Hoshi
804881fa94 audio/internal/readerdriver: Enable to return error at Suspend/Resume 2021-05-04 23:18:16 +09:00
Hajime Hoshi
58843b68f9 internal/hooks: Enable to return error at suspend/resume audio 2021-05-04 23:09:01 +09:00
Hajime Hoshi
29eade9b4a audio/internal/readdriver: Bug fix: Implement Suspend/Resume for browsers
Closes #1630
2021-05-04 18:49:39 +09:00
Hajime Hoshi
0de024229d audio: Guarantee that (*Player).Current's returning value is increased monotonically
Closes #1501
2021-03-31 23:41:28 +09:00
Hajime Hoshi
f4b770eff6 audio/internal/readerdriver: Add Player.Err 2021-03-28 22:21:07 +09:00
Hajime Hoshi
b46cb324ed audio: Add audio/internal/readerdriver package 2021-03-28 18:34:16 +09:00
Hajime Hoshi
7212cd7999 audio: Bug fix: Race condition on accessing the set of players
Closes #1548
2021-03-24 23:41:18 +09:00
Hajime Hoshi
07c10880f4 audio: Bug fix: Test failures on browsers 2021-03-22 03:50:05 +09:00
Hajime Hoshi
6d442c0a17 audio: Add comments 2021-02-28 23:47:57 +09:00
Hajime Hoshi
ed7d7e8976 audio/internal/go2cpp: Prepare the first buffer data to make the audio smoother 2021-01-16 03:28:47 +09:00
Hajime Hoshi
c742ae60bd audio: Bug fix: Implement renaderPlayer.IsPlayer correctly 2021-01-16 01:02:07 +09:00
Hajime Hoshi
bd3e930eef audio: Add readerPlayerFactory / readerDriver 2021-01-09 00:45:13 +09:00