mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
audio: Bug fix: compilation error on JavaScript
This commit is contained in:
parent
ab793d9c8b
commit
0b040e92e8
@ -47,12 +47,12 @@ func startPlaying(src io.Reader, sampleRate int) error {
|
|||||||
return errors.New("audio: audio couldn't be initialized")
|
return errors.New("audio: audio couldn't be initialized")
|
||||||
}
|
}
|
||||||
p := &player{
|
p := &player{
|
||||||
src: src,
|
src: src,
|
||||||
sampleRate: sampleRate,
|
sampleRate: sampleRate,
|
||||||
bufferSource: nil,
|
bufferSource: nil,
|
||||||
context: class.New(),
|
context: class.New(),
|
||||||
positionInSamples: int64(p.context.Get("currentTime").Float() * float64(p.sampleRate)),
|
|
||||||
}
|
}
|
||||||
|
p.positionInSamples = int64(p.context.Get("currentTime").Float() * float64(p.sampleRate))
|
||||||
go func() {
|
go func() {
|
||||||
defer p.close()
|
defer p.close()
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user