Commit Graph

13 Commits

Author SHA1 Message Date
Hajime Hoshi
100b42513e audio/internal/readerdriver: Reduce the mutex usages (Windows)
Closes #1652
2021-05-28 21:00:16 +09:00
Hajime Hoshi
c2148dcc01 Revert "tmp"
This reverts commit 9619276326.

Reason: Wrong commit
2021-05-28 19:49:59 +09:00
Hajime Hoshi
9619276326 tmp 2021-05-28 19:38:03 +09:00
Hajime Hoshi
dc2f5e296e audio/internal/readerdriver: Reduce mutext on Windows
The granularity of context switches on Windows is pretty big and
mutexes might not be efficent.
2021-05-28 19:25:59 +09:00
Hajime Hoshi
646f48ef09 audio/internal/readerdriver: Change the timing of updating the player state (Windows) 2021-05-28 17:10:28 +09:00
Hajime Hoshi
c54e5371ad audio/internal/readerdriver: Refactoring (Windows) 2021-05-28 16:45:55 +09:00
Hajime Hoshi
541156f255 audio/internal/readerdriver: Wait the loop when there is no player (Windows) 2021-05-28 16:16:56 +09:00
Hajime Hoshi
6a8abac194 audio/interna/readerdriver: Bug fix: Potential issue when all the players were gone
When all the players were gone, the waveOut is closed once. From
this state, playing an audio again might take long.

This change fixes the issue by not closing the waveOut even when
all the players are gone.

This change also changes the returning value of read when the
player doesn't play.
2021-05-28 16:09:43 +09:00
Hajime Hoshi
c3b8fa1c45 audio/internal/readerdriver: Handle errors correctly (Windows) 2021-05-28 14:09:05 +09:00
Hajime Hoshi
6c3c3533fb audio/internal/readerplayer: Bug fix: Potential deadlock when waveOutWrite failed (Windows) 2021-05-28 05:17:32 +09:00
Hajime Hoshi
f334eee1e4 audio/internal/readerdriver: Refactoring: unify add and play (Windows) 2021-05-28 04:40:50 +09:00
Hajime Hoshi
800a929e84 audio/internal/readerdriver: Add comments
Updates #1549
2021-05-23 00:38:18 +09:00
Hajime Hoshi
5bd1a883d1 audio/internal/readerdriver: Implmeent a reader driver for Windows
Updates #1549
2021-05-23 00:14:59 +09:00