Commit Graph
26 Commits
Author SHA1 Message Date
Imayhaveborkedit e1aa6cc264 Fix bad voice state when moving to a voice channel without permissions 2023-10-01 17:45:55 -04:00
Imayhaveborkedit 9f8f9bf56b Fix incorrect callback typing for WebsocketHook 2023-09-28 18:56:14 -04:00
Imayhaveborkedit 44284ae107 Rewrite voice connection internals 2023-09-28 17:51:22 -04:00
Imayhaveborkedit 48b4ea84c9 Add silence padding after transmission breaks
Prevents unwanted interpolation/distortion of audio by sending silence
packets after pausing or ending the audio stream.
2023-09-22 03:38:42 -04:00
Imayhaveborkedit dacf3cfe86 Fix possible FFmpegAudio AttributeError in __del__ 2023-09-20 17:13:50 -04:00
Imayhaveborkedit 7bdfd454be Normalize thread names
Every thread now has a name and either a contextually relevant
identifier or their in hex to disambiguate multiple threads of the same
type.  Also finally gets rid of that old python 2 style init call.
2023-09-03 02:41:16 -04:00
Imayhaveborkedit 8b8ce55378 Add encoder params to VoiceClient.play 2023-08-23 21:04:15 -04:00
Imayhaveborkedit b276f3f5a2 Split ffmpeg args
FFmpeg is actually capable of parsing this correctly but we split it for
consistency's sake.
2023-08-23 17:47:48 -04:00
Imayhaveborkedit 62c1ab21b2 Fixes/improvements to FFmpegAudio and subclasses 2023-08-23 07:49:55 -04:00
Imayhaveborkedit cdc220fa4c Fix voice websocket not being closed before being replaced 2023-08-04 19:12:59 -04:00
Imayhaveborkedit 12dcc7c44b Rearrange player cleanup code
Since apparently closing stdin and later calling communicate() is no bueno, 
we're just going to rearrange the process finalization code so both cleanup()
and the pipe loop exit conditions point to it.
2021-08-27 19:40:31 -04:00
Imayhaveborkedit f586f4dfbd Clarify connect() requires Intents.voice_states 2021-08-24 00:02:21 -04:00
Imayhaveborkedit 3561ce9d5a Fix FFmpeg based audiosource input piping
Due to an oversight that has existed since the very beginning, the pipe
argument has been broken since there was nothing to actually write 
the data to the process's stdin.  Now there is.

Also josh made me add typings blegh
2021-08-23 21:05:31 -04:00
Imayhaveborkedit ac061c31fb Fix default hook signature
Since the hook function can be both bound and unbound
the bound signature needs to accept an extra argument
2021-05-25 02:22:21 -04:00
Imayhaveborkedit 8e08bd6af2 Add vws message hook 2021-05-23 03:42:07 -04:00
Imayhaveborkedit 839afce178 Print exception tracebacks in voice threads
Errors occurring within `AudioSource.read()` and `after()` functions will now display their tracebacks as if they were unhandled exceptions.
2019-11-26 05:16:53 -05:00
Imayhaveborkedit bc147ea37b Fix FFmpegAudio._process not existing if _spawn_process raises 2019-08-27 19:53:44 -04:00
Imayhaveborkedit 20fa3001f2 Raise max encoder bitrate to 512kbps
Any higher is useless for opus anyways.
2019-06-20 22:52:47 -04:00
Daniel 3a36f78e08 Use is_connected() instead of _connected in checks
Was doing a falsy check on an Event object instead of using the (unused) is_connected() function.
2019-04-09 00:14:41 -04:00
Daniel 27063a91c7 Improve basic_voice example
Add stream option and command so we don't always have to download a file
Move repeated voice check code to before_invoke hook
Add typing indicators when making YTDLSources
2018-03-25 04:04:07 -04:00
Daniel d53c3a6c12 Fixed opus error check
Fixes #1056
2018-02-06 11:19:42 -05:00
Daniel ceb82ecc7b Fix self._process not existing during cleanup() in case of error 2017-11-21 17:51:34 -05:00
Daniel b532da7906 Fix waiting for resume when calling stop() on AudioPlayer 2017-07-21 18:37:22 -04:00
Daniel 6f42a5f2ec Fixed broken code
I should have tested it.
2017-07-07 22:09:56 -04:00
Daniel a037d469d7 Add basic rewrite voice example 2017-07-07 17:55:12 -04:00
Daniel 5a2b8e2ce6 Properly close session if client failed to start
`keep_alive` was not defined until it was created in `received_message`, `ws` is `None` until its actually connected, which doesn't always happen.  If an error happens before things start up properly, the client should now clean its objects up (fixes `unclosed client session` warning).
2016-04-22 22:40:25 -04:00