Log audio source throughput and stalls
This commit is contained in:
3 files changed
+188
-1
No files matched your search
+5
-1
@@ -20,7 +20,11 @@ func Register(name string, opener Opener) {
|
||||
func New(config *config.Audio) (Source, error) {
|
||||
opener, ok := drivers[config.Type]
|
||||
if ok {
|
||||
return opener(config)
|
||||
source, err := opener(config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewLogger(source, nil, 0), nil
|
||||
}
|
||||
return nil, fmt.Errorf("sound: no %q driver was found", config.Type)
|
||||
}
|
||||
Reference in new issue
Block a user