Commit Graph

779 Commits

Author SHA1 Message Date
Hajime Hoshi
6bbfec1869 audio: refactoring: initialize the context at an update hook
Closes #2715
2024-03-16 22:42:04 +09:00
Hajime Hoshi
9cd525a04e audio: bug fix: position adjustment should not start before ready
Updates #2901
2024-03-16 22:03:36 +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
788529ff76 audio: skip making a player at SetPosition when possible 2024-02-01 17:31:16 +09:00
Hajime Hoshi
d1ec00e2ba audio: don't create an underlying player at Position
This is simply unnecessary.
2024-02-01 17:18:18 +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
5f1d1ec412 update Oto to v3.0.0-alpha.2 2023-07-30 16:05:17 +09:00
Hajime Hoshi
875113782a update Oto to v3
Closes #2659
2023-07-30 14:52:59 +09:00
Hajime Hoshi
9b05d9eb35 audio: refactoring 2023-07-30 14:42:13 +09:00
Hajime Hoshi
65afb51d73 audio/wav: refactoring 2023-04-18 22:27:22 +09:00
Hajime Hoshi
aeca79494f audio: bug fix: compile error 2023-04-08 19:40:59 +09:00
Hajime Hoshi
85f8423345 audio: rename constants
Updates #2630
2023-04-08 19:14:28 +09:00
Pierre Curto
4de807cc44
all: fix typos (#2558)
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
8ef52841bc audio: use NewContextWithOptions
Upates #2534
2023-01-09 19:15:31 +09:00
Hajime Hoshi
6bce8fea2d audio: update comments 2023-01-09 18:53:19 +09:00
Artem Yadelskyi
5b53cef59e
all: remove old // +build comments (#2431)
Closes #2325
2022-11-03 12:55:14 +09:00
Hajime Hoshi
1906262ef4 audio/internal/convert: refactoring 2022-10-23 01:14:30 +09:00
Nathan Levett
18123a6336
audio/internal/convert: add a lazy-load getter for cosTable (#2404)
Closes #2286
2022-10-23 00:24:51 +09:00
Hajime Hoshi
80407fb9d6 audio/vorbis: use go:embed
Updates #1258
2022-09-17 21:58:32 +09:00
Hajime Hoshi
5404e4d68a all: replace io/ioutil with io and os
Closes #1770
2022-09-15 02:54:25 +09:00
Hajime Hoshi
655cd4bf68 all: remove the build tag
Updates #1415
2022-09-15 00:23:40 +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
Hajime Hoshi
2d43e59b37 audio: add comments 2022-08-31 12:10:01 +09:00
Hajime Hoshi
216ca95960 audio: bug fix: build error with Go 1.17 for iOS 2022-08-31 02:13:17 +09:00
Hajime Hoshi
48110eb518 audio: add an additional error information when creating a context
Updates hajimehoshi/oto#93
2022-08-31 01:05:36 +09:00
Hajime Hoshi
b858f36d54 remove the dependency on file2byteslice
Specify the version explicitly instead.
2022-08-23 16:34:55 +09:00
Hajime Hoshi
344d66c365 audio/internal/convert: remove Resampling.Close
This function is not used anywhere.
2022-08-21 23:48:33 +09:00
Hajime Hoshi
33616600e4 audio/vorbis: test Length with a non-seekable source
Updates #2252
2022-08-18 15:48:26 +09:00
Hajime Hoshi
1251bd5792 audio/vorbis: bug fix: error when a non-seeker source is given to Decode*
Closes #2252
2022-08-18 15:31:54 +09:00
Hajime Hoshi
dd292552d5 audio: move the implementation for NintendoSDK to Oto
Updates #2242
2022-08-12 20:53:55 +09:00
Hajime Hoshi
8081d0636a internal/cbackend: rename to nintendosdk
Updates #2242
2022-08-12 17:19:37 +09:00
Hajime Hoshi
e7c0a121c4 all: remove the build tag 'ebitencbackend'
This also automatically enables 'egl' when 'nintendosdk' is specified.

Updates #2242
2022-08-12 13:15:39 +09:00
Hajime Hoshi
dac6548c0c all: rename ebitenginecbackend to nintendosdk
Updates #2242
2022-08-12 02:05:29 +09:00
Hajime Hoshi
2b248ef783 audio: refactoring: remove audio/internal/cbackend 2022-08-08 23:58:46 +09:00
Hajime Hoshi
aca290caa9 audio: refactoring 2022-08-08 12:06:08 +09:00
Hajime Hoshi
3fe59e75cb audio: remove go2cpp support
Updates #2126
2022-08-07 21:56:57 +09:00
mattn
2bacecca24
fix typos (#2227) 2022-08-03 22:40:39 +09:00
mattn
3cd0daac67
go generate ./... with Go 1.19 (#2228) 2022-08-03 20:48:02 +09:00
divVerent
21207f827c
do not require installing file2byteslice to update go generate'd files. (#2221)
The tool is already referenced in go.mod, so it is trivial to just go run it -
that way, go generate can use it without the user explicitly installing it first.
2022-07-29 20:43:23 +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
c77e5884aa audio: change the naming convention: Num -> Count 2022-07-13 01:46:20 +09:00
Hajime Hoshi
428b1263d9 add ebitenginecbackend build tag besides ebitencbackend
Updates #2111
Updates #2190
2022-07-09 15:23:52 +09:00
Hajime Hoshi
8cb023e3c8 audio: refactoring: remove Reset from Player 2022-07-01 02:33:39 +09:00
Hajime Hoshi
7232b1a8a9 audio: bug fix: test failures 2022-07-01 02:31:29 +09:00
Hajime Hoshi
a516a5b092 update Oto (for refactoring) 2022-07-01 02:28:20 +09:00
Hajime Hoshi
858f3926ee audio/internal/cbackend: add comments 2022-07-01 02:26:09 +09:00
Hajime Hoshi
12d274eb0a update Oto for a player's Seek
Updates hajimehoshi/oto#172
2022-07-01 02:21:19 +09:00
Hajime Hoshi
abc8697ea3 audio: fix a wrong comment 2022-07-01 02:06:30 +09:00
Hajime Hoshi
75e84f6eda audio/mp3, audio/vorbis, audio/wav: add DecodeWithoutResampling
Updates #2055
2022-07-01 01:46:37 +09:00
Hajime Hoshi
d6e257084d audio: bug fix: potential busy reading after the source reaches EOF
Closes #2167
Updates hajimehoshi/oto#171
2022-06-27 22:54:33 +09:00
Hajime Hoshi
22c609dd1e audio: rename Ebiten -> Ebitengine 2022-05-26 00:27:27 +09:00
Hajime Hoshi
3f0b3f9686 audio/internal/cbackend: refactoring: remove unnecessary mutex locks 2022-04-12 21:04:10 +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
d74a627f41 audio/internal/cbackend: adjust the defalut buffer size to Oto's 2022-03-25 03:47:21 +09:00
Hajime Hoshi
e2de758160 audio/internal/cbackend: update comments 2022-03-25 03:46:57 +09:00
Hajime Hoshi
7744013b05
audio: add (*Player).UnplayedBufferSize (#2021)
Closes #2020
2022-03-22 16:55:56 +09:00
Hajime Hoshi
e4fba8b047 bug fix: compile error with Go 1.16 and older 2022-03-08 00:08:53 +09:00
Hajime Hoshi
6a1c17b06f audio/internal/cbackend: bug fix: use CompareAndSwap 2022-03-07 23:45:42 +09:00
Hajime Hoshi
1cb7633ff6 internal/ui: bug fix: atomic.Value.Store cannot be called when a differnet type value is already stored 2022-02-27 17:41:19 +09:00
Hajime Hoshi
011e5061df internal/cbackend: simplify the audio API 2021-12-23 22:20:04 +09:00
Hajime Hoshi
e6131894a7 internal/cbackend: add AudioBufferSizeInSeconds 2021-12-23 02:55:54 +09:00
Hajime Hoshi
1799ed0b28 add a build tag 'ebitencbackend' and internal/cbackend
This enables to create a C archive with Ebiten without an actual driver
implementation. This enables Ebiten work on a platform Go doesn't support.
See also Hitsumabushi project: github.com/hajimehoshi/hitsumabushi.

The backend C API is not stable and might change later. Then, the build
tag 'ebitencbackend' is not documented on purpose.

Closes #1900
2021-12-22 21:12:48 +09:00
Hajime Hoshi
336ed49bdc audio: bug fix: compile error on tests 2021-12-17 16:04:39 +09:00
Hajime Hoshi
eaaa601261 audio: refactoring: rename types 2021-12-17 16:02:12 +09:00
Hajime Hoshi
55add3e323 audio: reduce dependency on the package oto
Updates #1900
2021-12-17 15:51:07 +09:00
Hajime Hoshi
1eb5d4a188 audio: Add comments
Updates #1888
2021-11-30 21:56:47 +09:00
Hajime Hoshi
2d231c8454 audio: Add comment at NewInfiniteLoopWithIntro about the noises
Updates #1888
2021-11-30 00:29:11 +09:00
Hajime Hoshi
c91a6fb81f audio: Blend the loop start and after-the-loop part to reduce noises at InfiniteLoop
Closes #1888
2021-11-30 00:00:50 +09:00
Hajime Hoshi
90f59aad7c audio: Refactoring: Use the underlying source's Seek in Read (reland) 2021-11-29 20:56:39 +09:00
Hajime Hoshi
b81736793d Revert "audio: Refactoring: Use the underlying source's Seek in Read"
This reverts commit 15ba3ed4d1.

Reason: Test failure
2021-11-29 19:36:28 +09:00
Hajime Hoshi
15ba3ed4d1 audio: Refactoring: Use the underlying source's Seek in Read 2021-11-29 17:21:40 +09:00
Hajime Hoshi
88a27151ef audio: Fix documentation
ReadSeekCloser no longer exists.

Closes #1869
2021-11-10 01:27:35 +09:00
Hajime Hoshi
a3eb8933e5 audio/internal/convert: Simplify f32Reader implementation 2021-10-31 19:49:40 +09:00
Hajime Hoshi
630df60894 audio/internal/convert: Reuse a buffer cache 2021-10-31 19:40:58 +09:00
Hajime Hoshi
611cbad5d7 audio/internal/convert: Use byte instead of uint8 2021-10-31 19:34:52 +09:00
Hajime Hoshi
5b768679a3 audio: Bug fix: Compile error 2021-10-22 15:35:05 +09:00
Hajime Hoshi
d9967c53e5 audio: Treat Oto context's error 2021-10-22 15:29:00 +09:00
Hajime Hoshi
69087cdc40 audio: Use (*Context).NewPlayer 2021-10-07 22:34:59 +09:00
r3vit
57c45a13e4
Remove dot imports from tests - Remove dot imports (#1837)
Closes #1824
2021-10-02 19:58:48 +09:00
Hajime Hoshi
7422a3353a audi/internal/conver: Fix ring-buffer-like slice usages 2021-09-12 17:06:36 +09:00
Hajime Hoshi
21e0768937 audio/internal/reader: Move the driver part to Oto v2
Closes #1779
2021-08-22 02:10:39 +09:00
Hajime Hoshi
7a5254f48f audio: Refactoring 2021-08-22 00:36:28 +09:00
Hajime Hoshi
88da1bb23f audio: Bug fix: Compile failure on JS/Wasm 2021-08-22 00:29:05 +09:00
Hajime Hoshi
fe4f96e261 audio/internal/readerdriver: Refactoring for documentations
Updates #1779
2021-08-22 00:10:31 +09:00
Hajime Hoshi
fb1ab5e779 audio: Refactoring 2021-08-21 20:10:12 +09:00
Hajime Hoshi
5474a52392 audio: Bug fix: The tests failed
Updates #1665
2021-08-21 19:49:34 +09:00
Hajime Hoshi
a93897d9d2 audio: Remove Oto (v0) usages
Closes #1665
2021-08-21 19:29:32 +09:00
Hajime Hoshi
9f1113b733 audio/internal/readerdriver: Remove goroutines for Windows
Also this change changed the buffers to use smaller but more
headers to improve latency.

Updates #1768
2021-08-19 02:19:06 +09:00