Commit Graph

60 Commits

Author SHA1 Message Date
Hajime Hoshi
719838b7ab .github/workflows: update wasmbrowsertest to fix timeout issue
The issue agnivade/wasmbrowsertest#60 was fixed.

Updates #1313
2024-08-02 23:03:01 +09:00
Hajime Hoshi
b78475ed78 audio/internal/convert: try to make the test stable 2024-07-21 23:31:38 +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
1d260eac51 audio/internal/convert: bug fix: StereoI16 didn't work in some cases
There are no such actual use cases, so this is not a critical bug.
2024-07-21 11:37:07 +09:00
Hajime Hoshi
f36ea4125d audio/internal/convert: split some tests 2024-07-21 11:37:07 +09:00
Hajime Hoshi
f6c9c88f78 audio/internal/convert: better tests for Seek 2024-07-21 11:25:47 +09:00
Hajime Hoshi
e43ab06f35 audio/internal/convert: bug fix: the test input must be even number of float32s 2024-07-21 11:10:20 +09:00
Hajime Hoshi
a5213de991 audio/internal/convert: use math/rand instead of crypto/rand 2024-07-21 10:54:33 +09:00
Hajime Hoshi
f63c1c8fc5 audio/internal/convert: add StereoF32
Updates #2160
2024-07-21 10:52:10 +09:00
Hajime Hoshi
4689d656aa audio/vorbis: refactoring 2024-07-21 10:10:48 +09:00
Hajime Hoshi
531dc7efd9 audio/internal/convert: return an error when not seekable 2024-07-14 23:39:52 +09:00
Hajime Hoshi
1d75c9e967 audio/internal/convert: Seek with incomplete bytes should work
Usually users use audio.Player objects and doesn't use Resampling
object directly. Resampling object itself is exposed by
audio.Resample, but this is usually used with audio.Player objects.
Thus, this issue is not so serious in the real world.
2024-07-14 18:37:15 +09:00
Hajime Hoshi
fc70392093 audio/internal/convert: typo 2024-07-14 17:51:44 +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
91cdaa9f11 audio/internal/convert: bug fix: Read never returned io.EOF when seeked 2024-07-14 00:04:32 +09:00
Hajime Hoshi
03ca5c3b26 audio/internal/convert: bug fix: skip tests on browsers correctly 2024-07-14 00:03:44 +09:00
Hajime Hoshi
6f74e03cb3 audio/internal/convert: better tests 2024-07-13 22:42:26 +09:00
Hajime Hoshi
96a07c1bf2 audio/internal/convert: bug fix: skip some tests on browsers 2024-07-13 22:39:37 +09:00
Hajime Hoshi
43f505b3a0 audio: use float32 format under the hood
Updates #2160
2024-07-13 21:46:39 +09:00
Hajime Hoshi
f8e3bef368 audio/internal/convert: refactoring: move utilities to audio/vorbis 2024-07-07 17:03:11 +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
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
5404e4d68a all: replace io/ioutil with io and os
Closes #1770
2022-09-15 02:54:25 +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
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
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
c8ba51d26e audio/internal/convert: Avoid unnecessary allocations 2021-01-25 03:04:53 +09:00
Hajime Hoshi
ad218eae2d audio/internal/convert: Reduce allocations of float32 slices 2021-01-15 00:37:21 +09:00
Hajime Hoshi
3fb304e5a8 audio/internal/convert: Refactoring 2021-01-04 21:42:00 +09:00
Hajime Hoshi
f1f7b350de audio, audio/mp3, audio/vorbis, audio/wav: Remove Close functions
Fixes #859
2020-10-07 23:39:58 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
cba109ebee audio/mp3: Bug fix: Accept non-io.Closer at Resampling 2019-04-01 00:04:57 +09:00
Hajime Hoshi
f16f6cf4b9 audio/internal/convert: Add Float32Reader and NewReaderFromFloat32Reader 2019-01-15 11:46:31 +09:00
Hajime Hoshi
5c55df87d7 audio: Deprecate Size() and add Length() (#466) 2018-01-09 01:25:38 +09:00
Hajime Hoshi
ef282f7f4f audio/internal/convert: Remove unused functions 2018-01-09 00:26:54 +09:00
Hajime Hoshi
e83810fc57 audio/internal/convert: Add resampling_test.go
Fixes #369
2018-01-08 23:44:44 +09:00
Hajime Hoshi
11a1e6ec39 audio/internal/convert: Adjust window size again (confirmed this worked well on iPhone 6) 2018-01-06 01:49:55 +09:00
Hajime Hoshi
5b2dbf6036 audio/internal/convert: Adjust resamplingBufferSize again 2018-01-06 01:46:54 +09:00
Hajime Hoshi
ab70f6fc58 audio/internal/convert: Much faster sine/cosine functions 2018-01-06 00:15:07 +09:00
Hajime Hoshi
005d18ceff audio/internal/convert: Use int64 (now it is fast enough on browsers?) 2018-01-05 20:03:17 +09:00
Hajime Hoshi
c020101afc audio/internal/convert: Use cosine table 2018-01-05 19:40:12 +09:00
Hajime Hoshi
2884fb7070 audio/internal/convert: Fix algorithm 2018-01-05 18:21:14 +09:00
Hajime Hoshi
de1a22d9f3 audio/internal/convert: Bug fix: remove unneeded import 2017-12-31 00:15:36 +09:00
Hajime Hoshi
03942292f5 audio/internal/convert: Change the window smaller for performance
On iOS, resapling performance was not good.
2017-12-31 00:14:52 +09:00
Hajime Hoshi
e2a026138a audio/internal/convert: Use float64 for positions 2017-12-27 18:55:17 +09:00
Hajime Hoshi
6d6504085c audio/internal/convert: Rename members 2017-12-27 18:05:55 +09:00