Hajime Hoshi
fcdd4e16d4
audio/internal/readerdriver: Fill the buffer whenever starting to play
2021-05-09 03:51:45 +09:00
Hajime Hoshi
ae9e89b814
audio/internal/oboe: Bug fix: Not all players should not be suspended
2021-05-09 03:07:17 +09:00
Hajime Hoshi
7487222740
audio/internal/readerdriver: Remove Context's Close
2021-05-07 16:50:19 +09:00
Hajime Hoshi
410d0f52e5
audio/internal/readerdriver: Bug fix: createBuffer failed when the buffer size is 0
...
When the decoded audio size is exactly multiples of an internal
buffer size, the buffer's size becomes exactly zero when being
appended. In this case, createBuffer fails and the application
crashes.
This change fixes this issue by skipping to append a buffer in such
cases.
Closes #1635
2021-05-07 02:35:57 +09:00
Hajime Hoshi
aa9f669ec3
audio/internal/readerplayer: Move the buffer for resuming to the driver side
...
Closes #1633
2021-05-05 21:54:21 +09:00
Hajime Hoshi
4e0e5c6bbc
audio/internal/oboe: Bug fix: Always use OpenSL
...
AAudio doesn't care about plugging in/out headsets. There is a
workaround [1], but this is not easy to apply. Instead, alwasy use
OpenSL.
[1] https://github.com/google/oboe/blob/master/docs/notes/disconnect.md
Closes #1634
2021-05-05 18:09:44 +09:00
Hajime Hoshi
1fecaa0a90
audio/internal/readdriver: Bug fix: Wait for a while after finishing to write
...
Closes #1632
2021-05-05 17:05:23 +09:00
Hajime Hoshi
ded3cd1433
audio/internal/readerdriver: Refactoring: Remove player.state
2021-05-05 15:32:53 +09:00
Hajime Hoshi
f556590582
android/internal/readerdriver: Bug fix: Infinite recursive at closeImpl
2021-05-05 03:58:47 +09:00
Hajime Hoshi
c954dfa8fb
audio/internal/readerderiver: Bug fix: Reduce noises on Android
...
Closes #1632
2021-05-05 02:14:59 +09:00
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