Log audio source throughput and stalls

This commit is contained in:
maze committed 2026-10-29 17:30:04 +01:00
1 parent bc2460caf1
commit 3a378435c3
3 files changed
+188 -1

No files matched your search

+5 -1
View File
@@ -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)
}