spdif: Handle soundcard asleep, try to wake up with a random bitrate
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
parent
484e0f5295
commit
5d70cecaea
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ func (s *SPDIFSource) Enable() error {
|
|||
}
|
||||
s.Bitrate = sr
|
||||
|
||||
// If no bitrate, asume soundcard is sleeping, try to wake up with a random bitrate
|
||||
if sr == 0 {
|
||||
sr = 44100
|
||||
}
|
||||
|
||||
pipeR, pipeW, err := os.Pipe()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue