Commit Graph

561 Commits

Author SHA1 Message Date
Hajime Hoshi
83c9015468 audio/internal/oboe: Bug fix: Guard the players by a mutex
Closes #1631
2021-05-05 00:51:53 +09:00
Hajime Hoshi
ad86c297fb audio/internal/readdriver: Implement a driver for Android with Oboe
Closes #1626
2021-05-04 23:51:36 +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
bcf8ef85b6 audio: Bug fix: Compile error on the tests
Updates #1630
2021-05-04 22:10:49 +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
11e76d3fc8 audio/vorbis: Catch the Seek error 2021-05-03 23:11:14 +09:00
Hajime Hoshi
fc5970768d audio/internal/go2cpp: Bug fix: Potential deadlock at Play
Closes #1629
2021-05-03 17:54:25 +09:00
Hajime Hoshi
7adf6aac27 audio/internal/readerdriver: Simplify type names 2021-05-01 16:25:40 +09:00
Hajime Hoshi
1acf5bc260 audio/internal/readerdriver: Bug fix: Compile error 2021-04-29 18:37:10 +09:00
Hajime Hoshi
760072e3a9 audio/internal/readerdriver: Use a channel instead of a callback function 2021-04-29 18:21:06 +09:00
Hajime Hoshi
e62eba387d audio/vorbis: Accept io.Reader instead of io.ReadSeeker
Closes #1621
2021-04-24 16:41:23 +09:00
Hajime Hoshi
68d24f1c62 audio/mp3: Accept io.Reader instead of io.ReadSeeker
Updates #1621
2021-04-24 16:39:49 +09:00
Hajime Hoshi
62899e5902 audio/wav: Accept io.Reader instead of io.ReadSeeker
Updates #1621
2021-04-24 16:35:28 +09:00
Hajime Hoshi
08c3025560 audio/internal/readerdriver: Refactoring 2021-04-20 03:20:29 +09:00
Hajime Hoshi
24dc20e80e audio/internal/readerdriver: Bug fix: Need to align the buffer size 2021-04-20 02:39:33 +09:00
Hajime Hoshi
e650e71d8c audio/internal/readerdriver: Bug fix: ReadFull could get stuck
If the source io.Reader's implementation is not good (e.g., Read
returns 0 if the buffer size is not multiples of 4), io.ReadFull
gets stuck forever. Instead, use reguler Read with a decent amount
of bytes buffer.

Closes #1599
2021-04-20 01:29:15 +09:00
Hajime Hoshi
146678596b audio/internal/readerdriver: Bug fix: Invoke onReady for go2cpp
Updates #1599
2021-04-19 23:59:31 +09:00
Hajime Hoshi
ea9d64f5b8 audio: Bug fix: Need to call setReady from the reader player side
Updates #1599
2021-04-19 23:56:08 +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
83dc3966e7 audio/internal/go2cpp: Bug fix: Set the volume whenever the player state is 2021-03-31 21:08:32 +09:00
Hajime Hoshi
f0d7e16eb2 audio/internal/readerdriver: Refactoring 2021-03-28 23:27:47 +09:00
Hajime Hoshi
bf4c1e3d74 audio: Bug fix: Compile error for tests 2021-03-28 22:57:50 +09:00
Hajime Hoshi
f4efdd6355 audio/internal/go2cpp: Protect the functions by the lock correctly 2021-03-28 22:40:36 +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
7696d51839 audio: Bug fix: Duplicated pausing at reader players
This caused unexpected 'Unread' calls.
2021-03-24 00:19:49 +09:00
Hajime Hoshi
1083233d5f audio/internal/go2cpp: Replace isWritable with unplayedBufferSize instead
This is the more accurate way not to overflow the underlying buffer.
2021-03-23 23:46:57 +09:00
Hajime Hoshi
6f185063d6 audio: Ensure Close is called at a readerPlayer is GCed 2021-03-22 04:11:08 +09:00
Hajime Hoshi
07c10880f4 audio: Bug fix: Test failures on browsers 2021-03-22 03:50:05 +09:00
Hajime Hoshi
a17fea39a1 audio: Bug fix: Compile error on Go 1.13 2021-03-22 02:16:46 +09:00
Hajime Hoshi
49a8a491cd audio: Implement the reader player for browsers
Updates #1458
2021-03-22 01:53:52 +09:00
Hajime Hoshi
9e73b0d287 audio: Rename UnwrittenBufferSize -> UnplayedBufferSize 2021-03-01 01:27:42 +09:00
Hajime Hoshi
6d442c0a17 audio: Add comments 2021-02-28 23:47:57 +09:00
Hajime Hoshi
4bc0bb607b audio: Lazy initialization at reader players 2021-02-28 23:41:30 +09:00
Hajime Hoshi
dbdfce5fed audio: Add readerDriverPlayer.UnwrittenBufferSize to get the exact position 2021-02-28 01:42:48 +09:00
Hajime Hoshi
b8cdcdb847 audio: Bug fix: NewInfiniteLoop(WithIntro) should work with incomplete values
Closes #1503
2021-02-22 02:15:45 +09:00
Hajime Hoshi
29099cf660 audio: Bug fix: Continue to play the audio after seeking on go2cpp 2021-02-21 23:54:43 +09:00
Hajime Hoshi
027463ff88 audio: Bug fix: timeStream was not used for a reader player 2021-02-21 18:48:58 +09:00
Hajime Hoshi
68411e9591 audio/internal/go2cpp: Avoid unnecessary allocations 2021-01-25 03:09:13 +09:00
Hajime Hoshi
c8ba51d26e audio/internal/convert: Avoid unnecessary allocations 2021-01-25 03:04:53 +09:00
Hajime Hoshi
514904392c audio: Bug fix: Deadlock at acquiring the semaphore
Closes #1469
2021-01-23 23:07:19 +09:00
Hajime Hoshi
fbc7b3c884 audio/vorbis: Bug fix: Resampling didn't work correctly 2021-01-19 00:41:47 +09:00
Hajime Hoshi
2432530b51 Revert "audio/internal/go2cpp: Fix C++ side and remove the preparation"
This reverts commit 65f974588c.

Reason: Didn't improve the performance on some devices
2021-01-17 04:48:11 +09:00
Hajime Hoshi
65f974588c audio/internal/go2cpp: Fix C++ side and remove the preparation 2021-01-17 03:47:45 +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
ad218eae2d audio/internal/convert: Reduce allocations of float32 slices 2021-01-15 00:37:21 +09:00
Hajime Hoshi
612676cb19 audio/internal/go2cpp: Remove the buffer size argument 2021-01-13 22:30:52 +09:00
Hajime Hoshi
aeaa443bf2 audio/internal/go2cpp: Bug fix: Writing data must be concurrent-safe 2021-01-13 10:26:30 +09:00
Hajime Hoshi
78789a511c Revert "audio: Seek the source first at readerPlayer"
This reverts commit 68f12f066e.

Reason: Some data can be read after seeking before resetting
2021-01-13 02:01:00 +09:00
Hajime Hoshi
68f12f066e audio: Seek the source first at readerPlayer 2021-01-12 22:52:26 +09:00
Hajime Hoshi
2f8172f819 audio/internal/go2cpp: Recreate the underlying audio player when resetting 2021-01-12 20:42:45 +09:00
Hajime Hoshi
a66097df19 audio/internal/go2cpp: Remove unnecessary set 2021-01-12 11:38:30 +09:00
Hajime Hoshi
2dc37d30de audio/internal/go2cpp: Add a comment 2021-01-12 01:07:36 +09:00
Hajime Hoshi
a7dd00596a audio/internal/go2cpp: Add signaling at Pause 2021-01-12 00:43:16 +09:00
Hajime Hoshi
c009070840 audio/internal/go2cpp: Add readerDriverPlayer.Reset 2021-01-11 23:54:43 +09:00
Hajime Hoshi
3abb7a3604 audio/internal/go2cpp: Increase the temporary buffer size 2021-01-11 21:56:47 +09:00
Hajime Hoshi
8e6c3a570e audio/internal/go2cpp: Bug fix: Pass the correct size 2021-01-11 18:07:25 +09:00
Hajime Hoshi
9cc5bd80f9 audio/internal/go2cpp: Better waiting condition 2021-01-11 15:37:40 +09:00
Hajime Hoshi
dc8217dfeb audio/internal/go2cpp: Bug fix: Wrong state 2021-01-11 15:25:53 +09:00
Hajime Hoshi
52942751f0 audio: Move go2cpp -> internal/go2cpp 2021-01-09 18:21:32 +09:00
Hajime Hoshi
3579e1d0b7 audio: Implement timeStream 2021-01-09 17:16:37 +09:00
Hajime Hoshi
a2a7f5e701 audio: Add an implementation for go2cpp 2021-01-09 17:16:34 +09:00
Hajime Hoshi
bd3e930eef audio: Add readerPlayerFactory / readerDriver 2021-01-09 00:45:13 +09:00
Hajime Hoshi
bd1c3ff030 audio: Rename writerContext -> writerPlayerFactory 2021-01-07 11:24:40 +09:00
Hajime Hoshi
a6b3f32f3a audio: Refactoring 2021-01-07 02:14:42 +09:00
Hajime Hoshi
e04e709a10 audio: Refactor test files 2021-01-07 01:53:41 +09:00
Hajime Hoshi
bda285b376 audio: Refactoring 2021-01-07 01:33:57 +09:00
Hajime Hoshi
e77beac235 audio: Define playerImpl interface 2021-01-07 00:59:13 +09:00
Hajime Hoshi
7cf32efcd5 audio: Rename playerImpl -> writerContextPlayerImpl 2021-01-07 00:46:50 +09:00
Hajime Hoshi
c42a40a541 audio: Rename context -> writerContext
This is a preparation of a new type of context with io.Readers.
2021-01-07 00:26:28 +09:00
Hajime Hoshi
9849cb5c2b audio/wav: Add DecodeWithSampleRate
Closes #1460
2021-01-06 23:09:52 +09:00
Hajime Hoshi
b78dde0e37 audio/mp3: Add DecodeWithSampleRate
Updates #1460
2021-01-06 23:03:50 +09:00
Hajime Hoshi
f6a440765b audio/vorbis: Fix comments 2021-01-06 23:02:56 +09:00
Hajime Hoshi
96ca0a7ff9 audio/vorbis: Add DecodeWithSampleRate
Updates #1460
2021-01-06 22:57:25 +09:00
Hajime Hoshi
30278b80aa audio: Use the larget buffer size for go2cpp 2021-01-05 16:07:36 +09:00
Hajime Hoshi
0bf6eee605 audio: Reduce making a slice at a player's read 2021-01-04 21:51:26 +09:00
Hajime Hoshi
3fb304e5a8 audio/internal/convert: Refactoring 2021-01-04 21:42:00 +09:00
Hajime Hoshi
f292594184 audio: Use a new implentation for go2cpp in Oto 2020-12-30 19:21:15 +09:00
Hajime Hoshi
9a705c64f3 audio: Bug fix: Compile error 2020-12-21 18:39:06 +09:00
Hajime Hoshi
2a2866bf65 audio: Use a null context on go2cpp 2020-12-21 18:35:42 +09:00
Hajime Hoshi
8e46769284 audio: Remove returning values from Play/Pause 2020-10-10 23:45:18 +09:00
Hajime Hoshi
0673b384d8 audio: Update the comment
Updates #859
2020-10-07 23:43:38 +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
426cb5948a audio/vorbis: Remove the GopherJS part
Updates #1129
2020-10-07 01:33:19 +09:00
Hajime Hoshi
a22fdee171 audio/mp3: Remove the GopherJS part
Updates #1129
2020-10-07 01:33:19 +09:00
Hajime Hoshi
944a19c6f7 audio: Remove the error returning value from NewContext
Updates #1380
2020-10-05 02:25:13 +09:00
Hajime Hoshi
29b4087ebf audio: Remove the error returning value from NewPlayerFromBytes
Updates #1380
2020-10-05 02:18:27 +09:00
Hajime Hoshi
f4d050161a audio: Remove (*Context).Update
Updates #1127
2020-10-04 15:41:34 +09:00
Hajime Hoshi
825972b3e1 audio/mp3, audio/vorbis, audio/wav: Remove deprecated functions
Updates #1127
2020-10-04 15:35:17 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
9906e4b882 go generate 2020-09-20 23:28:17 +09:00
Hajime Hoshi
01a84a7121 audio/mp3: Make panic messages more consistent 2020-08-23 19:50:43 +09:00
Hajime Hoshi
d0181ce130 audio/wav: Remove an unused function 2020-08-23 19:49:31 +09:00
Hajime Hoshi
50fc914d72 Revert "audio/wav: Allow passing non-io.Seeker to Decode"
This reverts commit 19cd69da55.

Reason: Marked #1202 'won't fix'
2020-08-23 19:46:28 +09:00
Hajime Hoshi
19cd69da55 audio/wav: Allow passing non-io.Seeker to Decode
Updates #1202
2020-08-23 19:15:20 +09:00
Hajime Hoshi
a1ac574a60 docs: Use 'Deprecated:' annotation
Fixes #1160
2020-05-19 01:50:55 +09:00
Hajime Hoshi
4fa52dcc56 Remove MonoGame support
Fixes #1148
2020-05-08 19:32:28 +09:00