Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
7e6cc8cd1b | |||
0b40953cf5 | |||
2eb3b0a089 |
@ -21,7 +21,7 @@ This is the basic json configuration file layout:
|
|||||||
{
|
{
|
||||||
"Port": 8082
|
"Port": 8082
|
||||||
}
|
}
|
||||||
``
|
```
|
||||||
|
|
||||||
> All sounds should be in the same bitrate. It will assume the bitrate of the first loaded sample.
|
> All sounds should be in the same bitrate. It will assume the bitrate of the first loaded sample.
|
||||||
|
|
||||||
|
@ -99,11 +99,12 @@ func PlaySound(file string, index int, loop bool) int {
|
|||||||
amountOfLoops := 1
|
amountOfLoops := 1
|
||||||
if loop {
|
if loop {
|
||||||
amountOfLoops = -1
|
amountOfLoops = -1
|
||||||
|
fmt.Println("Looping sound: " + file)
|
||||||
}
|
}
|
||||||
shot := buffer.Streamer(amountOfLoops, buffer.Len())
|
shot := buffer.Streamer(0, buffer.Len())
|
||||||
|
|
||||||
done := make(chan bool)
|
done := make(chan bool)
|
||||||
ctrl := &beep.Ctrl{Streamer: shot, Paused: false}
|
ctrl := &beep.Ctrl{Streamer: beep.Loop(amountOfLoops, shot), Paused: false}
|
||||||
|
|
||||||
playbacks[index] = playback{
|
playbacks[index] = playback{
|
||||||
File: file,
|
File: file,
|
||||||
|
Reference in New Issue
Block a user