Add opus encoder and improve logging for audio streams#125
Add opus encoder and improve logging for audio streams#125chicco-carone wants to merge 3 commits intosnapcast:developfrom
Conversation
|
Also I accidentally pressed the shortcut on vscode to format the code with prettier which made this pr completely unreadable so i reverted it but it could be useful to implement a linter process when pushing to git or at least running manually prettier on the whole codebase to make the code more cohesive and follow a standardized format. |
|
Thanks! I think the |
|
Sorry for the pnpm thing. Since i use pnpm when I work on my project I forgot it. I'll also remove the logging thing. Edit: btw you can take a look at pino to use as a logger since its pretty simple to implement and should handle well lots of logs when debugging audio streams |
|
Moved to #129 to clean the pr |
This pull request includes several improvements and feature additions to the
snapstream.tsfile, focusing on replacingconsolestatements with a customLoggerclass for better logging and adding support for Opus decoding.Logging Improvements:
consolestatements with theLoggerclass for improved logging consistency and control inAudioStream,TimeProvider,OpusDecoder,FlacDecoder, andSnapStreamclasses.Opus Decoder Integration:
opus-decoderdependency topackage.jsonfor Opus decoding support.OpusDecoderclass with methods for initialization and decoding of Opus audio streams.Code Cleanup:
@types/nodedependency frompackage.json.consolestatements and replaced them with appropriate logger calls inFlacDecoderandTimeProviderclasses.Miscellaneous:
Loggerclass import and initialized logger instances in various classes to facilitate the new logging mechanism.